2022-03-17 17:57:28 +00:00
|
|
|
error: .or(Some(…)).unwrap() found
|
2022-03-18 22:18:36 +00:00
|
|
|
--> $DIR/or_then_unwrap.rs:24:20
|
2022-03-17 17:57:28 +00:00
|
|
|
|
|
|
|
|
LL | let _ = option.or(Some("fallback")).unwrap(); // should trigger lint
|
2022-03-18 22:18:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or("fallback")`
|
2022-03-17 17:57:28 +00:00
|
|
|
|
|
2022-03-18 00:04:33 +00:00
|
|
|
= note: `-D clippy::or-then-unwrap` implied by `-D warnings`
|
2022-03-17 17:57:28 +00:00
|
|
|
|
|
|
|
error: .or(Ok(…)).unwrap() found
|
2022-03-18 22:18:36 +00:00
|
|
|
--> $DIR/or_then_unwrap.rs:27:20
|
2022-03-17 17:57:28 +00:00
|
|
|
|
|
|
|
|
LL | let _ = result.or::<&str>(Ok("fallback")).unwrap(); // should trigger lint
|
2022-03-18 22:18:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or("fallback")`
|
2022-03-17 17:57:28 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|