Skip to content

Commit e52837c

Browse files
committed
Add note to test about Unfuse
1 parent 50c612f commit e52837c

File tree

1 file changed

+3
-0
lines changed
  • library/core/tests/iter/adapters

1 file changed

+3
-0
lines changed

library/core/tests/iter/adapters/skip.rs

+3
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,8 @@ fn test_skip_nth_back() {
196196
#[test]
197197
fn test_skip_non_fused() {
198198
let non_fused = Unfuse::new(0..10);
199+
200+
// `Skip` would previously exhaust the iterator in this `next` call and then erroneously try to
201+
// advance it further. `Unfuse` tests that this doesn't happen by panicking in that scenario.
199202
let _ = non_fused.skip(20).next();
200203
}

0 commit comments

Comments
 (0)