We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
FusedStream
ReadyChunks
1 parent f5733c9 commit bf3504bCopy full SHA for bf3504b
futures-util/src/stream/stream/ready_chunks.rs
@@ -1,4 +1,4 @@
1
-use crate::stream::Fuse;
+use crate::stream::{Fuse, StreamExt};
2
use alloc::vec::Vec;
3
use core::pin::Pin;
4
use futures_core::stream::{FusedStream, Stream};
@@ -22,7 +22,7 @@ impl<St: Stream> ReadyChunks<St> {
22
pub(super) fn new(stream: St, capacity: usize) -> Self {
23
assert!(capacity > 0);
24
25
- Self { stream: super::Fuse::new(stream), cap: capacity }
+ Self { stream: stream.fuse(), cap: capacity }
26
}
27
28
delegate_access_inner!(stream, St, (.));
@@ -75,7 +75,7 @@ impl<St: Stream> Stream for ReadyChunks<St> {
75
76
77
78
-impl<St: FusedStream> FusedStream for ReadyChunks<St> {
+impl<St: Stream> FusedStream for ReadyChunks<St> {
79
fn is_terminated(&self) -> bool {
80
self.stream.is_terminated()
81
0 commit comments