Skip to content

Commit

Permalink
rollup merge of rust-lang#23745: oneeman/trpl-looping
Browse files Browse the repository at this point in the history
Was reading the 'Looping' section of the book and was puzzled why the last example uses `0u32..10` when the others don't.  Tried it out without and it seems to work, so I figured it should just be `0..10`.  If there is a reason it needs to be `0u32..10` it should be explained in the text (I'd offer to do it but I have no idea).

r? @steveklabnik
  • Loading branch information
alexcrichton committed Mar 27, 2015
2 parents df49ea6 + dac552f commit 5f9fd2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/trpl/looping.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ We now loop forever with `loop` and use `break` to break out early.
iteration. This will only print the odd numbers:

```{rust}
for x in 0u32..10 {
for x in 0..10 {
if x % 2 == 0 { continue; }
println!("{}", x);
Expand Down

0 comments on commit 5f9fd2e

Please sign in to comment.