rust-clippy/tests/ui/result_map_or_into_option.stderr

24 lines
959 B
Text
Raw Normal View History

2023-11-23 12:30:36 +00:00
error: called `map_or(None, Some)` on a `Result` value
2024-02-17 12:16:29 +00:00
--> tests/ui/result_map_or_into_option.rs:5:13
|
LL | let _ = opt.map_or(None, Some);
2024-01-18 17:17:53 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `ok`: `opt.ok()`
|
= note: `-D clippy::result-map-or-into-option` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::result_map_or_into_option)]`
error: called `map_or_else(|_| None, Some)` on a `Result` value
2024-02-17 12:16:29 +00:00
--> tests/ui/result_map_or_into_option.rs:7:13
|
LL | let _ = opt.map_or_else(|_| None, Some);
2024-01-18 17:17:53 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `ok`: `opt.ok()`
error: called `map_or_else(|_| None, Some)` on a `Result` value
2024-02-17 12:16:29 +00:00
--> tests/ui/result_map_or_into_option.rs:10:13
|
LL | let _ = opt.map_or_else(|_| { None }, Some);
2024-01-18 17:17:53 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `ok`: `opt.ok()`
error: aborting due to 3 previous errors