2022-03-17 12:57:28 -05:00
|
|
|
error: .or(Some(…)).unwrap() found
|
2022-03-17 18:51:26 -05:00
|
|
|
--> $DIR/use_unwrap_or.rs:22:20
|
2022-03-17 12:57:28 -05:00
|
|
|
|
|
|
|
|
LL | let _ = option.or(Some("fallback")).unwrap(); // should trigger lint
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::use-unwrap-or` implied by `-D warnings`
|
|
|
|
= help: use `unwrap_or()` instead
|
|
|
|
|
|
|
|
error: .or(Ok(…)).unwrap() found
|
2022-03-17 18:51:26 -05:00
|
|
|
--> $DIR/use_unwrap_or.rs:25:20
|
2022-03-17 12:57:28 -05:00
|
|
|
|
|
|
|
|
LL | let _ = result.or::<&str>(Ok("fallback")).unwrap(); // should trigger lint
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: use `unwrap_or()` instead
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|