Skip to content

Commit 423983a

Browse files
ebkalderoncramertj
authored andcommitted
Remove Unpin sink bound and update docs of StreamExt::forward()
1 parent 4a62bb6 commit 423983a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

futures-util/src/stream/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -970,15 +970,15 @@ pub trait StreamExt: Stream {
970970
}
971971

972972
/// A future that completes after the given stream has been fully processed
973-
/// into the sink, including flushing.
973+
/// into the sink and the sink has been flushed and closed.
974974
///
975975
/// This future will drive the stream to keep producing items until it is
976-
/// exhausted, sending each item to the sink. It will complete once both the
977-
/// stream is exhausted and the sink has received and flushed all items.
978-
/// Note that the sink is **not** closed.
976+
/// exhausted, sending each item to the sink. It will complete once the
977+
/// stream is exhausted, the sink has received and flushed all items, and
978+
/// the sink is closed.
979979
fn forward<S>(self, sink: S) -> Forward<Self, S>
980980
where
981-
S: Sink + Unpin,
981+
S: Sink,
982982
Self: Stream<Item = Result<S::SinkItem, S::SinkError>> + Sized,
983983
{
984984
Forward::new(self, sink)

0 commit comments

Comments
 (0)