Skip to content

Commit

Permalink
KMergeBy is not lazy but must be used nonetheless
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet authored and jswrenn committed May 16, 2024
1 parent 2ad9e07 commit 074c7fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/kmerge_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ where
///
/// See [`.kmerge_by()`](crate::Itertools::kmerge_by) for more
/// information.
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
#[must_use = "this iterator adaptor is not lazy but does nearly nothing unless consumed"]
pub struct KMergeBy<I, F>
where
I: Iterator,
Expand Down
4 changes: 2 additions & 2 deletions tests/laziness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ must_use_tests! {
let _ = Panicking.merge_join_by(Panicking, |_, _| true);
let _ = Panicking.merge_join_by(Panicking, Ord::cmp);
}
#[ignore]
#[should_panic]
kmerge {
let _ = Panicking.map(|_| Panicking).kmerge();
}
#[ignore]
#[should_panic]
kmerge_by {
let _ = Panicking.map(|_| Panicking).kmerge_by(|_, _| true);
}
Expand Down

0 comments on commit 074c7fc

Please sign in to comment.