|
1 | | -error: unnecessary fun on contstuctor Some(_) |
| 1 | +error: unnecessary map on constructor Some(_) |
2 | 2 | --> $DIR/unnecessary_map_on_constructor.rs:32:13 |
3 | 3 | | |
4 | 4 | LL | let a = Some(x).map(fun); |
5 | 5 | | ^^^^^^^^^^^^^^^^ help: try: `Some(fun(x))` |
6 | 6 | | |
7 | 7 | = note: `-D clippy::unnecessary-map-on-constructor` implied by `-D warnings` |
8 | 8 |
|
9 | | -error: unnecessary fun on contstuctor Ok(_) |
| 9 | +error: unnecessary map on constructor Ok(_) |
10 | 10 | --> $DIR/unnecessary_map_on_constructor.rs:33:27 |
11 | 11 | | |
12 | 12 | LL | let b: SimpleResult = Ok(x).map(fun); |
13 | 13 | | ^^^^^^^^^^^^^^ help: try: `Ok(fun(x))` |
14 | 14 |
|
15 | | -error: unnecessary notfun on contstuctor Err(_) |
| 15 | +error: unnecessary map_err on constructor Err(_) |
16 | 16 | --> $DIR/unnecessary_map_on_constructor.rs:34:27 |
17 | 17 | | |
18 | 18 | LL | let c: SimpleResult = Err(err).map_err(notfun); |
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Err(notfun(err))` |
20 | 20 |
|
21 | | -error: unnecessary fun on contstuctor Option::Some(_) |
| 21 | +error: unnecessary map on constructor Option::Some(_) |
22 | 22 | --> $DIR/unnecessary_map_on_constructor.rs:36:13 |
23 | 23 | | |
24 | 24 | LL | let a = Option::Some(x).map(fun); |
25 | 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Option::Some(fun(x))` |
26 | 26 |
|
27 | | -error: unnecessary fun on contstuctor SimpleResult::Ok(_) |
| 27 | +error: unnecessary map on constructor SimpleResult::Ok(_) |
28 | 28 | --> $DIR/unnecessary_map_on_constructor.rs:37:27 |
29 | 29 | | |
30 | 30 | LL | let b: SimpleResult = SimpleResult::Ok(x).map(fun); |
31 | 31 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `SimpleResult::Ok(fun(x))` |
32 | 32 |
|
33 | | -error: unnecessary notfun on contstuctor SimpleResult::Err(_) |
| 33 | +error: unnecessary map_err on constructor SimpleResult::Err(_) |
34 | 34 | --> $DIR/unnecessary_map_on_constructor.rs:38:27 |
35 | 35 | | |
36 | 36 | LL | let c: SimpleResult = SimpleResult::Err(err).map_err(notfun); |
37 | 37 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `SimpleResult::Err(notfun(err))` |
38 | 38 |
|
39 | | -error: unnecessary fun on contstuctor Ok(_) |
| 39 | +error: unnecessary map on constructor Ok(_) |
40 | 40 | --> $DIR/unnecessary_map_on_constructor.rs:39:52 |
41 | 41 | | |
42 | 42 | LL | let b: std::result::Result<i32, SimpleError> = Ok(x).map(fun); |
43 | 43 | | ^^^^^^^^^^^^^^ help: try: `Ok(fun(x))` |
44 | 44 |
|
45 | | -error: unnecessary notfun on contstuctor Err(_) |
| 45 | +error: unnecessary map_err on constructor Err(_) |
46 | 46 | --> $DIR/unnecessary_map_on_constructor.rs:40:52 |
47 | 47 | | |
48 | 48 | LL | let c: std::result::Result<i32, SimpleError> = Err(err).map_err(notfun); |
|
0 commit comments