]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/filter_map_next_fixable.rs
3 #![feature(custom_inner_attributes)]
4 #![warn(clippy::all, clippy::pedantic)]
8 let a
= ["1", "lol", "3", "NaN", "5"];
10 let element
: Option
<i32> = a
.iter().filter_map(|s
| s
.parse().ok()).next();
11 assert_eq
!(element
, Some(1));
15 #![clippy::msrv = "1.29"]
17 let a
= ["1", "lol", "3", "NaN", "5"];
18 let _
: Option
<i32> = a
.iter().filter_map(|s
| s
.parse().ok()).next();
22 #![clippy::msrv = "1.30"]
24 let a
= ["1", "lol", "3", "NaN", "5"];
25 let _
: Option
<i32> = a
.iter().filter_map(|s
| s
.parse().ok()).next();