From ea4ec59c50b7c8e9a3f5a5fa4784ba7ff280fd4d Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Tue, 2 Aug 2016 16:40:49 -0400 Subject: [PATCH] Remove hidden code until #96 is fixed --- src/ch04-03-slices.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/ch04-03-slices.md b/src/ch04-03-slices.md index a7936907f..01507f1df 100644 --- a/src/ch04-03-slices.md +++ b/src/ch04-03-slices.md @@ -207,17 +207,6 @@ But what about our error condition from before? Slices also fix that. Using the slice version of `first_word()` will throw an error: ```rust,ignore -# fn first_word(s: &String) -> &str { -# let bytes = s.as_bytes(); -# -# for (i, &byte) in bytes.iter().enumerate() { -# if byte == 32 { -# return &s[0..i]; -# } -# } -# -# &s[..] -# } fn main() { let mut s = String::from("hello world");