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 cd86208 commit 8138afbCopy full SHA for 8138afb
src/stream/stream/flatten.rs
@@ -54,6 +54,19 @@ impl<S: Stream<Item: IntoStream>> Flatten<S> {
54
}
55
56
57
+impl<S, U> Stream for Flatten<S>
58
+where
59
+ S: Stream<Item: IntoStream<IntoStream = U, Item = U::Item>> + std::marker::Unpin,
60
+ U: Stream + std::marker::Unpin,
61
+{
62
+ type Item = U::Item;
63
+
64
+ fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
65
+ self.as_mut().inner().poll_next(cx)
66
+ }
67
+}
68
69
70
/// Real logic of both `Flatten` and `FlatMap` which simply delegate to
71
/// this type.
72
#[derive(Clone, Debug)]
0 commit comments