Sign in
fuchsia
/
third_party
/
rust
/
e3029abfaec4252ab0ae7010780be0094d8870e0
/
.
/
src
/
tools
/
clippy
/
tests
/
ui
/
methods_fixable.rs
blob: 11de924593ed2d8062c9d7afc8e2efca07e76eef [
file
] [
log
] [
blame
]
#![
warn
(
clippy
::
filter_next
)]
#![
allow
(
clippy
::
useless_vec
)]
/// Checks implementation of `FILTER_NEXT` lint.
fn
main
()
{
let
v
=
vec
![
3
,
2
,
1
,
0
,
-
1
,
-
2
,
-
3
];
// Single-line case.
let
_
=
v
.
iter
().
filter
(|&
x
|
*
x
<
0
).
next
();
}