@@ -84,28 +84,46 @@ LL | let _ = Some(5).map_or(false, |n| n == 5).then(|| 1);
8484 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(Some(5) == Some(5))`
8585
8686error: 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
88100 |
89101LL | let _ = r.map_or(false, |x| x == 7);
90102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_ok_and instead: `r.is_ok_and(|x| x == 7)`
91103
92104error: this `map_or` is redundant
93- --> tests/ui/unnecessary_map_or.rs:60 :13
105+ --> tests/ui/unnecessary_map_or.rs:59 :13
94106 |
95107LL | let _ = r.map_or(false, func);
96108 | ^^^^^^^^^^^^^^^^^^^^^ help: use is_ok_and instead: `r.is_ok_and(func)`
97109
98110error: this `map_or` is redundant
99- --> tests/ui/unnecessary_map_or.rs:61 :13
111+ --> tests/ui/unnecessary_map_or.rs:60 :13
100112 |
101113LL | let _ = Some(5).map_or(false, func);
102114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `Some(5).is_some_and(func)`
103115
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+
104122error: this `map_or` is redundant
105123 --> tests/ui/unnecessary_map_or.rs:66:13
106124 |
107125LL | let _ = r.map_or(false, |x| x == 8);
108126 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(r == Ok(8))`
109127
110- error: aborting due to 15 previous errors
128+ error: aborting due to 18 previous errors
111129
0 commit comments