File tree 2 files changed +4
-2
lines changed
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> {
243
243
/// This future will drive the stream to keep producing items until it is
244
244
/// exhausted, sending each item to the sink. It will complete once both the
245
245
/// 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.
247
248
///
248
249
/// Doing `sink.send_all(stream)` is roughly equivalent to
249
250
/// `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 {
1484
1484
/// the sink is closed. Note that neither the original stream nor provided
1485
1485
/// sink will be output by this future. Pass the sink by `Pin<&mut S>`
1486
1486
/// (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.
1488
1489
#[ cfg( feature = "sink" ) ]
1489
1490
#[ cfg_attr( docsrs, doc( cfg( feature = "sink" ) ) ) ]
1490
1491
fn forward < S > ( self , sink : S ) -> Forward < Self , S >
You can’t perform that action at this time.
0 commit comments