mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Fix copy_iterator uitest
This commit is contained in:
parent
b1faaaeb0c
commit
0dc38c047e
1 changed files with 2 additions and 4 deletions
|
@ -16,8 +16,6 @@ impl Iterator for Countdown {
|
|||
|
||||
fn main() {
|
||||
let my_iterator = Countdown(5);
|
||||
let a: Vec<_> = my_iterator.take(1).collect();
|
||||
assert_eq!(a.len(), 1);
|
||||
let b: Vec<_> = my_iterator.collect();
|
||||
assert_eq!(b.len(), 5);
|
||||
assert_eq!(my_iterator.take(1).count(), 1);
|
||||
assert_eq!(my_iterator.count(), 5);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue