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 @@ -1329,7 +1329,8 @@ pub trait StreamExt: Stream {
13291329 /// the sink is closed. Note that neither the original stream nor provided
13301330 /// sink will be output by this future. Pass the sink by `Pin<&mut S>`
13311331 /// (for example, via `forward(&mut sink)` inside an `async` fn/block) in
1332- /// order to preserve access to the `Sink`.
1332+ /// order to preserve access to the `Sink`. If the stream produces an error,
1333+ /// that error will be returned by this future without flushing/closing the sink.
13331334 #[cfg(feature = "sink")]
13341335 #[cfg_attr(docsrs, doc(cfg(feature = "sink")))]
13351336 fn forward<S>(self, sink: S) -> Forward<Self, S>
You can’t perform that action at this time.
0 commit comments