File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,8 @@ pub trait SinkExt<Item>: Sink<Item> {
243243 /// This future will drive the stream to keep producing items until it is
244244 /// exhausted, sending each item to the sink. It will complete once both the
245245 /// stream is exhausted, the sink has received all items, and the sink has
246- /// been flushed. Note that the sink is **not** closed.
246+ /// been flushed. Note that the sink is **not** closed. If the stream produces
247+ /// an error, that error will be returned by this future without flushing the sink.
247248 ///
248249 /// Doing `sink.send_all(stream)` is roughly equivalent to
249250 /// `stream.forward(sink)`. The returned future will exhaust all items from
Original file line number Diff line number Diff line change @@ -1484,7 +1484,8 @@ pub trait StreamExt: Stream {
14841484 /// the sink is closed. Note that neither the original stream nor provided
14851485 /// sink will be output by this future. Pass the sink by `Pin<&mut S>`
14861486 /// (for example, via `forward(&mut sink)` inside an `async` fn/block) in
1487- /// order to preserve access to the `Sink`.
1487+ /// order to preserve access to the `Sink`. If the stream produces an error,
1488+ /// that error will be returned by this future without flushing/closing the sink.
14881489 #[ cfg( feature = "sink" ) ]
14891490 #[ cfg_attr( docsrs, doc( cfg( feature = "sink" ) ) ) ]
14901491 fn forward < S > ( self , sink : S ) -> Forward < Self , S >
You can’t perform that action at this time.
0 commit comments