Skip to content

Commit 55c669c

Browse files
committed
core::iter::repeat_with: fix tests some more
1 parent f025eff commit 55c669c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libcore/tests/iter.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1565,11 +1565,11 @@ fn test_repeat_with_rev() {
15651565
let mut curr = 1;
15661566
let mut pow2 = repeat_with(|| { let tmp = curr; curr *= 2; tmp })
15671567
.rev().take(4);
1568-
assert_eq!(it.next(), Some(1));
1569-
assert_eq!(it.next(), Some(2));
1570-
assert_eq!(it.next(), Some(4));
1571-
assert_eq!(it.next(), Some(8));
1572-
assert_eq!(it.next(), None);
1568+
assert_eq!(pow2.next(), Some(1));
1569+
assert_eq!(pow2.next(), Some(2));
1570+
assert_eq!(pow2.next(), Some(4));
1571+
assert_eq!(pow2.next(), Some(8));
1572+
assert_eq!(pow2.next(), None);
15731573
}
15741574

15751575
#[test]

0 commit comments

Comments
 (0)