File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 7171 Si : Sink + Unpin ,
7272 St : Stream < Item = Result < Si :: SinkItem , Si :: SinkError > > ,
7373{
74- type Output = Result < Si , Si :: SinkError > ;
74+ type Output = Result < ( ) , Si :: SinkError > ;
7575
7676 fn poll (
7777 mut self : Pin < & mut Self > ,
9191 Poll :: Ready ( None ) => {
9292 try_ready ! ( self . as_mut( ) . sink( ) . as_pin_mut( ) . expect( INVALID_POLL )
9393 . 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 ( ( ) ) )
9596 }
9697 Poll :: Pending => {
9798 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 {
976976 /// exhausted, sending each item to the sink. It will complete once both the
977977 /// stream is exhausted and the sink has received and flushed all items.
978978 /// 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`.
985979 fn forward < S > ( self , sink : S ) -> Forward < Self , S >
986980 where
987981 S : Sink + Unpin ,
You can’t perform that action at this time.
0 commit comments