mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Remove bad test in for_loop
This commit is contained in:
parent
13bb22a68b
commit
7b135efa73
1 changed files with 0 additions and 4 deletions
|
@ -158,10 +158,6 @@ fn main() {
|
||||||
println!("{}", i);
|
println!("{}", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in (10..0).rev() { // not an error, this is an established idiom for looping backwards on a range
|
|
||||||
println!("{}", i);
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in (10..0).map(|x| x * 2) { // not an error, it can't be known what arbitrary methods do to a range
|
for i in (10..0).map(|x| x * 2) { // not an error, it can't be known what arbitrary methods do to a range
|
||||||
println!("{}", i);
|
println!("{}", i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue