File tree 2 files changed +3
-8
lines changed
2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 71
71
Si : Sink + Unpin ,
72
72
St : Stream < Item = Result < Si :: SinkItem , Si :: SinkError > > ,
73
73
{
74
- type Output = Result < Si , Si :: SinkError > ;
74
+ type Output = Result < ( ) , Si :: SinkError > ;
75
75
76
76
fn poll (
77
77
mut self : Pin < & mut Self > ,
91
91
Poll :: Ready ( None ) => {
92
92
try_ready ! ( self . as_mut( ) . sink( ) . as_pin_mut( ) . expect( INVALID_POLL )
93
93
. poll_close( waker) ) ;
94
- return Poll :: Ready ( Ok ( self . as_mut ( ) . sink ( ) . take ( ) . unwrap ( ) ) )
94
+ let _ = self . as_mut ( ) . sink ( ) . take ( ) . unwrap ( ) ;
95
+ return Poll :: Ready ( Ok ( ( ) ) )
95
96
}
96
97
Poll :: Pending => {
97
98
try_ready ! ( self . as_mut( ) . sink( ) . as_pin_mut( ) . expect( INVALID_POLL )
Original file line number Diff line number Diff line change @@ -976,12 +976,6 @@ pub trait StreamExt: Stream {
976
976
/// exhausted, sending each item to the sink. It will complete once both the
977
977
/// stream is exhausted and the sink has received and flushed all items.
978
978
/// Note that the sink is **not** closed.
979
- ///
980
- /// On completion, the sink is returned.
981
- ///
982
- /// Note that this combinator is only usable with `Unpin` sinks.
983
- /// Sinks that are not `Unpin` will need to be pinned in order to be used
984
- /// with `forward`.
985
979
fn forward < S > ( self , sink : S ) -> Forward < Self , S >
986
980
where
987
981
S : Sink + Unpin ,
You can’t perform that action at this time.
0 commit comments