Skip to content

Commit bbc8790

Browse files
committed
v1.9の英文ドキュメントと差し替えた
1 parent 631707e commit bbc8790

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

1.9/en/book/loops.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ Don't forget to add the parentheses around the range.
125125
#### On iterators:
126126

127127
```rust
128-
# let lines = "hello\nworld".lines();
128+
let lines = "hello\nworld".lines();
129+
129130
for (linenumber, line) in lines.enumerate() {
130131
println!("{}: {}", linenumber, line);
131132
}
@@ -134,10 +135,8 @@ for (linenumber, line) in lines.enumerate() {
134135
Outputs:
135136

136137
```text
137-
0: Content of line one
138-
1: Content of line two
139-
2: Content of line three
140-
3: Content of line four
138+
0: hello
139+
1: world
141140
```
142141

143142
## Ending iteration early
@@ -195,7 +194,7 @@ for x in 0..10 {
195194
You may also encounter situations where you have nested loops and need to
196195
specify which one your `break` or `continue` statement is for. Like most
197196
other languages, by default a `break` or `continue` will apply to innermost
198-
loop. In a situation where you would like to a `break` or `continue` for one
197+
loop. In a situation where you would like to `break` or `continue` for one
199198
of the outer loops, you can use labels to specify which loop the `break` or
200199
`continue` statement applies to. This will only print when both `x` and `y` are
201200
odd:

0 commit comments

Comments
 (0)