You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
168
+
--> $DIR/methods.rs:272:13
152
169
|
153
170
LL | let _ = v.iter().find(|&x| {
154
171
| _____________^
@@ -158,15 +175,13 @@ LL | | ).is_some();
158
175
| |______________________________^
159
176
160
177
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
161
-
--> $DIR/methods.rs:274:13
178
+
--> $DIR/methods.rs:278:22
162
179
|
163
180
LL | let _ = v.iter().position(|&x| x < 0).is_some();
164
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165
-
|
166
-
= note: replace `position(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
181
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
167
182
168
183
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
169
-
--> $DIR/methods.rs:277:13
184
+
--> $DIR/methods.rs:281:13
170
185
|
171
186
LL | let _ = v.iter().position(|&x| {
172
187
| _____________^
@@ -176,15 +191,13 @@ LL | | ).is_some();
176
191
| |______________________________^
177
192
178
193
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
179
-
--> $DIR/methods.rs:283:13
194
+
--> $DIR/methods.rs:287:22
180
195
|
181
196
LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
182
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183
-
|
184
-
= note: replace `rposition(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
197
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
185
198
186
199
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
187
-
--> $DIR/methods.rs:286:13
200
+
--> $DIR/methods.rs:290:13
188
201
|
189
202
LL | let _ = v.iter().rposition(|&x| {
190
203
| _____________^
@@ -194,12 +207,12 @@ LL | | ).is_some();
194
207
| |______________________________^
195
208
196
209
error: used unwrap() on an Option value. If you don't want to handle the None case gracefully, consider using expect() to provide a better panic message
197
-
--> $DIR/methods.rs:301:13
210
+
--> $DIR/methods.rs:305:13
198
211
|
199
212
LL | let _ = opt.unwrap();
200
213
| ^^^^^^^^^^^^
201
214
|
202
215
= note: `-D clippy::option-unwrap-used` implied by `-D warnings`
0 commit comments