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 f9a4c35 commit 41cf0f8Copy full SHA for 41cf0f8
src/stream/once.rs
@@ -4,6 +4,7 @@ use pin_project_lite::pin_project;
4
5
use crate::stream::Stream;
6
use crate::task::{Context, Poll};
7
+use crate::stream::double_ended_stream::DoubleEndedStream;
8
9
/// Creates a stream that yields a single item.
10
///
@@ -46,3 +47,9 @@ impl<T> Stream for Once<T> {
46
47
Poll::Ready(self.project().value.take())
48
}
49
50
+
51
+impl <T> DoubleEndedStream for Once<T> {
52
+ fn poll_next_back(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
53
+ Poll::Ready(self.project().value.take())
54
+ }
55
+}
0 commit comments