File tree Expand file tree Collapse file tree 3 files changed +9
-59
lines changed Expand file tree Collapse file tree 3 files changed +9
-59
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,14 +3,12 @@ use crate::stream::Stream;
33use std:: pin:: Pin ;
44use std:: task:: { Context , Poll } ;
55
6- mod from_iter;
76mod next_back;
87mod nth_back;
98mod rfind;
109mod rfold;
1110mod try_rfold;
1211
13- pub use from_iter:: { from_iter, FromIter } ;
1412use next_back:: NextBackFuture ;
1513use nth_back:: NthBackFuture ;
1614use rfind:: RFindFuture ;
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ use std::pin::Pin;
33use pin_project_lite:: pin_project;
44
55use crate :: stream:: Stream ;
6+ #[ cfg( feature = "unstable" ) ]
7+ use crate :: stream:: double_ended_stream:: DoubleEndedStream ;
68use crate :: task:: { Context , Poll } ;
79
810pin_project ! {
@@ -51,3 +53,10 @@ impl<I: Iterator> Stream for FromIter<I> {
5153 Poll :: Ready ( self . iter . next ( ) )
5254 }
5355}
56+
57+ #[ cfg( feature = "unstable" ) ]
58+ impl < T : DoubleEndedIterator > DoubleEndedStream for FromIter < T > {
59+ fn poll_next_back ( mut self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < Option < T :: Item > > {
60+ Poll :: Ready ( self . iter . next_back ( ) )
61+ }
62+ }
You can’t perform that action at this time.
0 commit comments