25 lines
606 B
Plaintext
25 lines
606 B
Plaintext
|
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
|
||
|
|