Skip to content

Commit

Permalink
muse use collect result
Browse files Browse the repository at this point in the history
  • Loading branch information
Pzixel committed Dec 24, 2024
1 parent ff0c942 commit 4cfdb89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,7 @@ pub trait Itertools: Iterator {

/// `.collect_vec()` is simply a type specialization of [`Iterator::collect`],
/// for convenience.
#[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]
#[cfg(feature = "use_alloc")]
fn collect_vec(self) -> Vec<Self::Item>
where
Expand Down Expand Up @@ -2330,6 +2331,7 @@ pub trait Itertools: Iterator {
///
/// # let _ = do_stuff;
/// ```
#[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]
fn try_collect<T, U, E>(self) -> Result<U, E>
where
Self: Sized + Iterator<Item = Result<T, E>>,
Expand Down

0 comments on commit 4cfdb89

Please sign in to comment.