Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nanoqsh committed May 4, 2024
1 parent d7f97c5 commit b7842f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion futures-util/src/stream/stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,12 @@ pub trait StreamExt: Stream {
assert_stream::<Self::Item, _>(TakeWhile::new(self, f))
}

/// todo
/// Take elements from this stream while the provided asynchronous future
/// resolves to `Some(_)`.
///
/// This function, like `Iterator::map_while`, will take elements from the
/// stream until the future `f` resolves to `None`. Once one element
/// returns `None`, it will always return that the stream is done.
///
/// # Examples
///
Expand Down

0 comments on commit b7842f0

Please sign in to comment.