]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/flat_map_identity.rs
Auto merge of #99099 - Stargateur:phantomdata_debug, r=joshtriplett
[rust.git] / src / tools / clippy / tests / ui / flat_map_identity.rs
1 // run-rustfix
2
3 #![allow(unused_imports, clippy::needless_return)]
4 #![warn(clippy::flat_map_identity)]
5
6 use std::convert;
7
8 fn main() {
9     let iterator = [[0, 1], [2, 3], [4, 5]].iter();
10     let _ = iterator.flat_map(|x| x);
11
12     let iterator = [[0, 1], [2, 3], [4, 5]].iter();
13     let _ = iterator.flat_map(convert::identity);
14
15     let iterator = [[0, 1], [2, 3], [4, 5]].iter();
16     let _ = iterator.flat_map(|x| return x);
17 }