diff options
| author | bors <bors@rust-lang.org> | 2018-12-17 16:01:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-17 16:01:46 +0000 |
| commit | adbfec229ce07ff4b2a7bf2d6dec2d13cb224980 (patch) | |
| tree | bf6d0ae09d9558cffe97c353b2bbb1b221a267d0 /src/libcore/tests | |
| parent | 54f3cd6873149a00ae0fb7723f200dccbb4baaa9 (diff) | |
| parent | f0483f76e6feb256abffb060029f57e09c6d4dc0 (diff) | |
| download | rust-adbfec229ce07ff4b2a7bf2d6dec2d13cb224980.tar.gz rust-adbfec229ce07ff4b2a7bf2d6dec2d13cb224980.zip | |
Auto merge of #56904 - sinkuu:cycle_fold, r=bluss
Remove Cycle::try_fold override Fixes #56883
Diffstat (limited to 'src/libcore/tests')
| -rw-r--r-- | src/libcore/tests/iter.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/tests/iter.rs b/src/libcore/tests/iter.rs index 4efa0136314..00b4aa4fa2d 100644 --- a/src/libcore/tests/iter.rs +++ b/src/libcore/tests/iter.rs @@ -1003,6 +1003,8 @@ fn test_cycle() { assert_eq!(it.next(), None); assert_eq!(empty::<i32>().cycle().fold(0, |acc, x| acc + x), 0); + + assert_eq!(once(1).cycle().skip(1).take(4).fold(0, |acc, x| acc + x), 4); } #[test] |
