]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/filter_map_next_fixable.fixed
Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795'
[rust.git] / src / tools / clippy / tests / ui / filter_map_next_fixable.fixed
1 // run-rustfix
2
3 #![warn(clippy::all, clippy::pedantic)]
4
5 fn main() {
6     let a = ["1", "lol", "3", "NaN", "5"];
7
8     let element: Option<i32> = a.iter().find_map(|s| s.parse().ok());
9     assert_eq!(element, Some(1));
10 }