File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 1dd9240e56a4059684805b71580cbcc59e59fa64
2
+ refs/heads/master: a38a1b6c7ae87953e51b5a1c93c974f7b9b08ec9
Original file line number Diff line number Diff line change @@ -2357,7 +2357,7 @@ iter range(int x, int y) -> int @{
2357
2357
@}
2358
2358
@}
2359
2359
2360
- for each (int i in range(5,7)) @{
2360
+ for each (i: int in range(5,7)) @{
2361
2361
@dots {};
2362
2362
@}
2363
2363
@end example
@@ -3239,9 +3239,9 @@ An example of a @code{note} expression:
3239
3239
@example
3240
3240
fn read_file_lines(&str path) -> vec[str] @{
3241
3241
note path;
3242
- vec[str] r ;
3243
- file f = open_read(path);
3244
- for each (str s in lines(f)) @{
3242
+ let r: vec[str];
3243
+ let f: file = open_read(path);
3244
+ for each (s: str in lines(f)) @{
3245
3245
vec::append(r,s);
3246
3246
@}
3247
3247
ret r;
@@ -3374,7 +3374,7 @@ Example of a foreach loop:
3374
3374
@example
3375
3375
let txt: str;
3376
3376
let lines: vec[str];
3377
- for each (str s in str::split(txt, "\n")) @{
3377
+ for each (s: str in str::split(txt, "\n")) @{
3378
3378
vec::push(lines, s);
3379
3379
@}
3380
3380
@end example
You can’t perform that action at this time.
0 commit comments