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 {
2344
2344
2345
2345
/// `.collect_vec()` is simply a type specialization of [`Iterator::collect`],
2346
2346
/// for convenience.
2347
+ #[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
2347
2348
#[ cfg( feature = "use_alloc" ) ]
2348
2349
fn collect_vec ( self ) -> Vec < Self :: Item >
2349
2350
where
@@ -2375,6 +2376,7 @@ pub trait Itertools: Iterator {
2375
2376
///
2376
2377
/// # let _ = do_stuff;
2377
2378
/// ```
2379
+ #[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
2378
2380
fn try_collect < T , U , E > ( self ) -> Result < U , E >
2379
2381
where
2380
2382
Self : Sized + Iterator < Item = Result < T , E > > ,
You can’t perform that action at this time.
0 commit comments