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 @@ -2299,6 +2299,7 @@ pub trait Itertools: Iterator {
2299
2299
2300
2300
/// `.collect_vec()` is simply a type specialization of [`Iterator::collect`],
2301
2301
/// for convenience.
2302
+ #[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
2302
2303
#[ cfg( feature = "use_alloc" ) ]
2303
2304
fn collect_vec ( self ) -> Vec < Self :: Item >
2304
2305
where
@@ -2330,6 +2331,7 @@ pub trait Itertools: Iterator {
2330
2331
///
2331
2332
/// # let _ = do_stuff;
2332
2333
/// ```
2334
+ #[ must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead" ]
2333
2335
fn try_collect < T , U , E > ( self ) -> Result < U , E >
2334
2336
where
2335
2337
Self : Sized + Iterator < Item = Result < T , E > > ,
You can’t perform that action at this time.
0 commit comments