File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: stream:: { FuturesUnordered , StreamExt } ;
2
2
use futures_core:: future:: Future ;
3
3
use futures_core:: stream:: Stream ;
4
- use futures_core:: task:: { Context , Poll } ;
4
+ use futures_core:: { FusedStream , task:: { Context , Poll } } ;
5
5
use pin_project:: pin_project;
6
6
use core:: cmp:: Ordering ;
7
7
use core:: fmt:: { self , Debug } ;
@@ -203,6 +203,12 @@ impl<Fut: Future> FromIterator<Fut> for FuturesOrdered<Fut> {
203
203
}
204
204
}
205
205
206
+ impl < Fut : Future > FusedStream for FuturesOrdered < Fut > {
207
+ fn is_terminated ( & self ) -> bool {
208
+ self . in_progress_queue . is_terminated ( ) && self . queued_outputs . is_empty ( )
209
+ }
210
+ }
211
+
206
212
impl < Fut : Future > Extend < Fut > for FuturesOrdered < Fut > {
207
213
fn extend < I > ( & mut self , iter : I )
208
214
where
You can’t perform that action at this time.
0 commit comments