@@ -84,28 +84,46 @@ LL | let _ = Some(5).map_or(false, |n| n == 5).then(|| 1);
84
84
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(Some(5) == Some(5))`
85
85
86
86
error: this `map_or` is redundant
87
- --> tests/ui/unnecessary_map_or.rs:55:13
87
+ --> tests/ui/unnecessary_map_or.rs:29:13
88
+ |
89
+ LL | let _ = Some(5).map_or(true, |n| n == 5);
90
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_none_or instead: `Some(5).is_none_or(|n| n == 5)`
91
+
92
+ error: this `map_or` is redundant
93
+ --> tests/ui/unnecessary_map_or.rs:30:13
94
+ |
95
+ LL | let _ = Some(5).map_or(true, |n| 5 == n);
96
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_none_or instead: `Some(5).is_none_or(|n| 5 == n)`
97
+
98
+ error: this `map_or` is redundant
99
+ --> tests/ui/unnecessary_map_or.rs:54:13
88
100
|
89
101
LL | let _ = r.map_or(false, |x| x == 7);
90
102
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_ok_and instead: `r.is_ok_and(|x| x == 7)`
91
103
92
104
error: this `map_or` is redundant
93
- --> tests/ui/unnecessary_map_or.rs:60 :13
105
+ --> tests/ui/unnecessary_map_or.rs:59 :13
94
106
|
95
107
LL | let _ = r.map_or(false, func);
96
108
| ^^^^^^^^^^^^^^^^^^^^^ help: use is_ok_and instead: `r.is_ok_and(func)`
97
109
98
110
error: this `map_or` is redundant
99
- --> tests/ui/unnecessary_map_or.rs:61 :13
111
+ --> tests/ui/unnecessary_map_or.rs:60 :13
100
112
|
101
113
LL | let _ = Some(5).map_or(false, func);
102
114
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `Some(5).is_some_and(func)`
103
115
116
+ error: this `map_or` is redundant
117
+ --> tests/ui/unnecessary_map_or.rs:61:13
118
+ |
119
+ LL | let _ = Some(5).map_or(true, func);
120
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_none_or instead: `Some(5).is_none_or(func)`
121
+
104
122
error: this `map_or` is redundant
105
123
--> tests/ui/unnecessary_map_or.rs:66:13
106
124
|
107
125
LL | let _ = r.map_or(false, |x| x == 8);
108
126
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(r == Ok(8))`
109
127
110
- error: aborting due to 15 previous errors
128
+ error: aborting due to 18 previous errors
111
129
0 commit comments