File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -2344,6 +2344,7 @@ pub trait Itertools: Iterator {
23442344
23452345 /// `.collect_vec()` is simply a type specialization of [`Iterator::collect`],
23462346 /// for convenience.
2347+ #[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
23472348 #[ cfg( feature = "use_alloc" ) ]
23482349 fn collect_vec ( self ) -> Vec < Self :: Item >
23492350 where
@@ -2375,6 +2376,7 @@ pub trait Itertools: Iterator {
23752376 ///
23762377 /// # let _ = do_stuff;
23772378 /// ```
2379+ #[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
23782380 fn try_collect < T , U , E > ( self ) -> Result < U , E >
23792381 where
23802382 Self : Sized + Iterator < Item = Result < T , E > > ,
You can’t perform that action at this time.
0 commit comments