We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1faaae commit 0dc38c0Copy full SHA for 0dc38c0
tests/ui/copy_iterator.rs
@@ -16,8 +16,6 @@ impl Iterator for Countdown {
16
17
fn main() {
18
let my_iterator = Countdown(5);
19
- let a: Vec<_> = my_iterator.take(1).collect();
20
- assert_eq!(a.len(), 1);
21
- let b: Vec<_> = my_iterator.collect();
22
- assert_eq!(b.len(), 5);
+ assert_eq!(my_iterator.take(1).count(), 1);
+ assert_eq!(my_iterator.count(), 5);
23
}
0 commit comments