Skip to content

Commit

Permalink
Add note to test about Unfuse
Browse files Browse the repository at this point in the history
  • Loading branch information
timvermeulen committed Jul 18, 2022
1 parent c184ab4 commit e171b33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/tests/iter/adapters/skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,8 @@ fn test_skip_nth_back() {
#[test]
fn test_skip_non_fused() {
let non_fused = Unfuse::new(0..10);

// `Skip` would previously exhaust the iterator in this `next` call and then erroneously try to
// advance it further. `Unfuse` tests that this doesn't happen by panicking in that scenario.
let _ = non_fused.skip(20).next();
}

0 comments on commit e171b33

Please sign in to comment.