about summary refs log tree commit diff
path: root/src/libcore/tests
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2018-02-12 09:15:13 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2018-02-12 09:15:13 +0100
commit55c669c4d9f7b245e2c237dc2b5d0390afe2620d (patch)
treed3375a4f450cd7b29fa14c405fb529712d336b08 /src/libcore/tests
parentf025eff21d1832fcd3941ae847fec2aaf23d3b0b (diff)
downloadrust-55c669c4d9f7b245e2c237dc2b5d0390afe2620d.tar.gz
rust-55c669c4d9f7b245e2c237dc2b5d0390afe2620d.zip
core::iter::repeat_with: fix tests some more
Diffstat (limited to 'src/libcore/tests')
-rw-r--r--src/libcore/tests/iter.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/tests/iter.rs b/src/libcore/tests/iter.rs
index f42970685f5..4c33c8440a3 100644
--- a/src/libcore/tests/iter.rs
+++ b/src/libcore/tests/iter.rs
@@ -1565,11 +1565,11 @@ fn test_repeat_with_rev() {
     let mut curr = 1;
     let mut pow2 = repeat_with(|| { let tmp = curr; curr *= 2; tmp })
                     .rev().take(4);
-    assert_eq!(it.next(), Some(1));
-    assert_eq!(it.next(), Some(2));
-    assert_eq!(it.next(), Some(4));
-    assert_eq!(it.next(), Some(8));
-    assert_eq!(it.next(), None);
+    assert_eq!(pow2.next(), Some(1));
+    assert_eq!(pow2.next(), Some(2));
+    assert_eq!(pow2.next(), Some(4));
+    assert_eq!(pow2.next(), Some(8));
+    assert_eq!(pow2.next(), None);
 }
 
 #[test]