File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 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() {
2121 }
2222
2323 // check over a `Result`
24- for x in result. into_iter ( ) {
24+ for x in result. iter_mut ( ) {
2525 println ! ( "{}" , x) ;
2626 }
2727
2828 // check over a `Result`
29- for x in result. iter_mut ( ) {
29+ for x in result. into_iter ( ) {
3030 println ! ( "{}" , x) ;
3131 }
3232
Original file line number Diff line number Diff line change @@ -26,18 +26,18 @@ LL | for x in result {
2626error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
2727 --> $DIR/for_loops_over_fallibles.rs:24:14
2828 |
29- LL | for x in result.into_iter () {
29+ LL | for x in result.iter_mut () {
3030 | ^^^^^^
3131 |
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`
3333
3434error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
3535 --> $DIR/for_loops_over_fallibles.rs:29:14
3636 |
37- LL | for x in result.iter_mut () {
37+ LL | for x in result.into_iter () {
3838 | ^^^^^^
3939 |
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`
4141
4242error: for loop over `option.ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement
4343 --> $DIR/for_loops_over_fallibles.rs:33:14
You can’t perform that action at this time.
0 commit comments