1
- error:
1
+ error: using `map` over `inspect`
2
2
--> tests/ui/manual_inspect.rs:5:21
3
3
|
4
4
LL | let _ = Some(0).map(|x| {
@@ -12,7 +12,7 @@ LL ~ let _ = Some(0).inspect(|&x| {
12
12
LL ~ println!("{}", x);
13
13
|
14
14
15
- error:
15
+ error: using `map` over `inspect`
16
16
--> tests/ui/manual_inspect.rs:10:21
17
17
|
18
18
LL | let _ = Some(0).map(|x| {
@@ -24,7 +24,7 @@ LL ~ let _ = Some(0).inspect(|&x| {
24
24
LL ~ println!("{x}");
25
25
|
26
26
27
- error:
27
+ error: using `map` over `inspect`
28
28
--> tests/ui/manual_inspect.rs:15:21
29
29
|
30
30
LL | let _ = Some(0).map(|x| {
@@ -36,7 +36,7 @@ LL ~ let _ = Some(0).inspect(|&x| {
36
36
LL ~ println!("{}", x * 5 + 1);
37
37
|
38
38
39
- error:
39
+ error: using `map` over `inspect`
40
40
--> tests/ui/manual_inspect.rs:20:21
41
41
|
42
42
LL | let _ = Some(0).map(|x| {
@@ -50,7 +50,7 @@ LL | panic!();
50
50
LL ~ }
51
51
|
52
52
53
- error:
53
+ error: using `map` over `inspect`
54
54
--> tests/ui/manual_inspect.rs:27:21
55
55
|
56
56
LL | let _ = Some(0).map(|x| {
@@ -65,7 +65,7 @@ LL | panic!();
65
65
LL ~ }
66
66
|
67
67
68
- error:
68
+ error: using `map` over `inspect`
69
69
--> tests/ui/manual_inspect.rs:78:41
70
70
|
71
71
LL | let _ = Some((String::new(), 0u32)).map(|x| {
@@ -80,7 +80,7 @@ LL | panic!();
80
80
LL ~ }
81
81
|
82
82
83
- error:
83
+ error: using `map` over `inspect`
84
84
--> tests/ui/manual_inspect.rs:104:33
85
85
|
86
86
LL | let _ = Some(String::new()).map(|x| {
98
98
LL ~ println!("test");
99
99
|
100
100
101
- error:
101
+ error: using `map` over `inspect`
102
102
--> tests/ui/manual_inspect.rs:115:21
103
103
|
104
104
LL | let _ = Some(0).map(|x| {
@@ -113,7 +113,7 @@ LL | panic!();
113
113
LL ~ }
114
114
|
115
115
116
- error:
116
+ error: using `map` over `inspect`
117
117
--> tests/ui/manual_inspect.rs:130:46
118
118
|
119
119
LL | let _ = Some(Cell2(Cell::new(0u32))).map(|x| {
@@ -125,7 +125,7 @@ LL ~ let _ = Some(Cell2(Cell::new(0u32))).inspect(|x| {
125
125
LL ~ x.0.set(1);
126
126
|
127
127
128
- error:
128
+ error: using `map` over `inspect`
129
129
--> tests/ui/manual_inspect.rs:146:34
130
130
|
131
131
LL | let _: Result<_, ()> = Ok(0).map(|x| {
@@ -137,7 +137,7 @@ LL ~ let _: Result<_, ()> = Ok(0).inspect(|&x| {
137
137
LL ~ println!("{}", x);
138
138
|
139
139
140
- error:
140
+ error: using `map_err` over `inspect_err`
141
141
--> tests/ui/manual_inspect.rs:151:35
142
142
|
143
143
LL | let _: Result<(), _> = Err(0).map_err(|x| {
@@ -166,7 +166,7 @@ LL | | .count();
166
166
= note: `-D clippy::suspicious-map` implied by `-D warnings`
167
167
= help: to override `-D warnings` add `#[allow(clippy::suspicious_map)]`
168
168
169
- error:
169
+ error: using `map` over `inspect`
170
170
--> tests/ui/manual_inspect.rs:158:10
171
171
|
172
172
LL | .map(|x| {
0 commit comments