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 @@ -21,12 +21,12 @@ fn for_loops_over_fallibles() {
21
21
}
22
22
23
23
// check over a `Result`
24
- for x in result. into_iter ( ) {
24
+ for x in result. iter_mut ( ) {
25
25
println ! ( "{}" , x) ;
26
26
}
27
27
28
28
// check over a `Result`
29
- for x in result. iter_mut ( ) {
29
+ for x in result. into_iter ( ) {
30
30
println ! ( "{}" , x) ;
31
31
}
32
32
Original file line number Diff line number Diff line change @@ -26,18 +26,18 @@ LL | for x in result {
26
26
error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
27
27
--> $DIR/for_loops_over_fallibles.rs:24:14
28
28
|
29
- LL | for x in result.into_iter () {
29
+ LL | for x in result.iter_mut () {
30
30
| ^^^^^^
31
31
|
32
- = help: consider replacing `for x in result.into_iter ()` with `if let Ok(x) = result`
32
+ = help: consider replacing `for x in result.iter_mut ()` with `if let Ok(x) = result`
33
33
34
34
error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
35
35
--> $DIR/for_loops_over_fallibles.rs:29:14
36
36
|
37
- LL | for x in result.iter_mut () {
37
+ LL | for x in result.into_iter () {
38
38
| ^^^^^^
39
39
|
40
- = help: consider replacing `for x in result.iter_mut ()` with `if let Ok(x) = result`
40
+ = help: consider replacing `for x in result.into_iter ()` with `if let Ok(x) = result`
41
41
42
42
error: for loop over `option.ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement
43
43
--> $DIR/for_loops_over_fallibles.rs:33:14
You can’t perform that action at this time.
0 commit comments