2020-10-30 21:06:27 +00:00
|
|
|
error: unnecessary closure used to substitute value for `Result::Err`
|
2023-05-31 17:47:10 +00:00
|
|
|
--> $DIR/unnecessary_lazy_eval_unfixable.rs:13:13
|
2020-10-30 21:06:27 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Ok(1).unwrap_or_else(|()| 2);
|
2022-03-15 13:29:17 +00:00
|
|
|
| ^^^^^^----------------------
|
|
|
|
| |
|
|
|
|
| help: use `unwrap_or(..)` instead: `unwrap_or(2)`
|
2020-10-30 21:06:27 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: unnecessary closure used to substitute value for `Result::Err`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/unnecessary_lazy_eval_unfixable.rs:19:13
|
2020-10-30 21:06:27 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Ok(1).unwrap_or_else(|e::E| 2);
|
2022-03-15 13:29:17 +00:00
|
|
|
| ^^^^^^------------------------
|
|
|
|
| |
|
|
|
|
| help: use `unwrap_or(..)` instead: `unwrap_or(2)`
|
2020-10-30 21:06:27 +00:00
|
|
|
|
|
|
|
error: unnecessary closure used to substitute value for `Result::Err`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/unnecessary_lazy_eval_unfixable.rs:21:13
|
2020-10-30 21:06:27 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Ok(1).unwrap_or_else(|SomeStruct { .. }| 2);
|
2022-03-15 13:29:17 +00:00
|
|
|
| ^^^^^^-------------------------------------
|
|
|
|
| |
|
|
|
|
| help: use `unwrap_or(..)` instead: `unwrap_or(2)`
|
2020-10-30 21:06:27 +00:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|