rust/tests/ui/manual_map_option_2.stderr

25 lines
606 B
Plaintext
Raw Normal View History

error: manual implementation of `Option::map`
--> $DIR/manual_map_option_2.rs:6:13
|
LL | let _ = match Some(0) {
| _____________^
LL | | Some(x) => Some({
LL | | let y = (String::new(), String::new());
LL | | (x, y.0)
LL | | }),
LL | | None => None,
LL | | };
| |_____^
|
= note: `-D clippy::manual-map` implied by `-D warnings`
help: try this
|
LL | let _ = Some(0).map(|x| {
LL | let y = (String::new(), String::new());
LL | (x, y.0)
LL | });
|
error: aborting due to previous error