We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25c1eff commit cb9ab62Copy full SHA for cb9ab62
src/lib.rs
@@ -2344,6 +2344,7 @@ pub trait Itertools: Iterator {
2344
2345
/// `.collect_vec()` is simply a type specialization of [`Iterator::collect`],
2346
/// for convenience.
2347
+ #[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]
2348
#[cfg(feature = "use_alloc")]
2349
fn collect_vec(self) -> Vec<Self::Item>
2350
where
@@ -2375,6 +2376,7 @@ pub trait Itertools: Iterator {
2375
2376
///
2377
/// # let _ = do_stuff;
2378
/// ```
2379
2380
fn try_collect<T, U, E>(self) -> Result<U, E>
2381
2382
Self: Sized + Iterator<Item = Result<T, E>>,
0 commit comments