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 {
1068
1068
/// This future will drive the stream to keep producing items until it is
1069
1069
/// exhausted, sending each item to the sink. It will complete once the
1070
1070
/// 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.
1072
1075
fn forward < S > ( self , sink : S ) -> Forward < Self , S >
1073
1076
where
1074
1077
S : Sink < <Self as TryStream >:: Ok > ,
You can’t perform that action at this time.
0 commit comments