Skip to content

Commit 4cfdb89

Browse files
committed
muse use collect result
1 parent ff0c942 commit 4cfdb89

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@ pub trait Itertools: Iterator {
22992299

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

0 commit comments

Comments
 (0)