change based on review
This commit is contained in:
parent
5a49918f36
commit
3737abe802
@ -21,12 +21,12 @@ fn for_loops_over_fallibles() {
|
||||
}
|
||||
|
||||
// check over a `Result`
|
||||
for x in result.into_iter() {
|
||||
for x in result.iter_mut() {
|
||||
println!("{}", x);
|
||||
}
|
||||
|
||||
// check over a `Result`
|
||||
for x in result.iter_mut() {
|
||||
for x in result.into_iter() {
|
||||
println!("{}", x);
|
||||
}
|
||||
|
||||
|
@ -26,19 +26,19 @@ LL | for x in result {
|
||||
error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
|
||||
--> $DIR/for_loops_over_fallibles.rs:24:14
|
||||
|
|
||||
LL | for x in result.into_iter() {
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: consider replacing `for x in result.into_iter()` with `if let Ok(x) = result`
|
||||
|
||||
error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
|
||||
--> $DIR/for_loops_over_fallibles.rs:29:14
|
||||
|
|
||||
LL | for x in result.iter_mut() {
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: consider replacing `for x in result.iter_mut()` with `if let Ok(x) = result`
|
||||
|
||||
error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
|
||||
--> $DIR/for_loops_over_fallibles.rs:29:14
|
||||
|
|
||||
LL | for x in result.into_iter() {
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: consider replacing `for x in result.into_iter()` with `if let Ok(x) = result`
|
||||
|
||||
error: for loop over `option.ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement
|
||||
--> $DIR/for_loops_over_fallibles.rs:33:14
|
||||
|
|
||||
|
Loading…
x
Reference in New Issue
Block a user