We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a487f5 commit 09d54ebCopy full SHA for 09d54eb
futures-util/src/stream/stream/buffered.rs
@@ -1,4 +1,4 @@
1
-use crate::stream::{Fuse, FuturesOrdered, StreamExt};
+use crate::stream::{Fuse, FusedStream, FuturesOrdered, StreamExt};
2
use core::fmt;
3
use core::num::NonZeroUsize;
4
use core::pin::Pin;
@@ -100,6 +100,16 @@ where
100
}
101
102
103
+impl<St> FusedStream for Buffered<St>
104
+where
105
+ St: Stream,
106
+ St::Item: Future,
107
+{
108
+ fn is_terminated(&self) -> bool {
109
+ self.stream.is_done() && self.in_progress_queue.is_terminated()
110
+ }
111
+}
112
+
113
// Forwarding impl of Sink from the underlying stream
114
#[cfg(feature = "sink")]
115
impl<S, Item> Sink<Item> for Buffered<S>
0 commit comments