mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
Add 'unnecessary_flat_map.fixed'
This commit is contained in:
13
tests/ui/unnecessary_flat_map.fixed
Normal file
13
tests/ui/unnecessary_flat_map.fixed
Normal file
@@ -0,0 +1,13 @@
|
||||
// run-rustfix
|
||||
|
||||
#![warn(clippy::flat_map_identity)]
|
||||
|
||||
use std::convert;
|
||||
|
||||
fn main() {
|
||||
let iterator = [[0, 1], [2, 3], [4, 5]].iter();
|
||||
iterator.flatten();
|
||||
|
||||
let iterator = [[0, 1], [2, 3], [4, 5]].iter();
|
||||
iterator.flatten();
|
||||
}
|
||||
Reference in New Issue
Block a user