File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1068,7 +1068,10 @@ pub trait StreamExt: Stream {
10681068 /// This future will drive the stream to keep producing items until it is
10691069 /// exhausted, sending each item to the sink. It will complete once the
10701070 /// stream is exhausted, the sink has received and flushed all items, and
1071- /// the sink is closed.
1071+ /// the sink is closed. Note that neither the original stream nor provided
1072+ /// sink will be output by this future. Pass the sink by `Pin<&mut S>`
1073+ /// (for example, via `forward(&mut sink)` inside an `async` fn/block) in
1074+ /// order to preserve access to the Sink.
10721075 fn forward < S > ( self , sink : S ) -> Forward < Self , S >
10731076 where
10741077 S : Sink < <Self as TryStream >:: Ok > ,
You can’t perform that action at this time.
0 commit comments