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