]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/filter_map_next_fixable.fixed
Auto merge of #84620 - Dylan-DPC:rollup-wkv97im, r=Dylan-DPC
[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 }