From 85fd039271bba5056d61e04529bead7048b9e93c Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Wed, 10 Aug 2016 19:46:32 -0400 Subject: [PATCH] Fix the merge I messed up --- src/ch04-03-slices.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ch04-03-slices.md b/src/ch04-03-slices.md index 044c029d1..cbda81644 100644 --- a/src/ch04-03-slices.md +++ b/src/ch04-03-slices.md @@ -25,7 +25,7 @@ fn first_word(s: &String) -> usize { let bytes = s.as_bytes(); for (i, &item) in bytes.iter().enumerate() { - if byte == b' ' { + if item == b' ' { return i; } } @@ -81,7 +81,7 @@ that it will still be valid in the future. Consider this: # let bytes = s.as_bytes(); # # for (i, &item) in bytes.iter().enumerate() { -# if byte == b' ' { +# if item == b' ' { # return i; # } # } @@ -181,7 +181,7 @@ fn first_word(s: &String) -> &str { let bytes = s.as_bytes(); for (i, &item) in bytes.iter().enumerate() { - if byte == b' ' { + if item == b' ' { return &s[0..i]; } } @@ -279,7 +279,7 @@ with no loss of functionality: # let bytes = s.as_bytes(); # # for (i, &item) in bytes.iter().enumerate() { -# if byte == b' ' { +# if item == b' ' { # return &s[0..i]; # } # }