File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ use crate::stream::Stream;
6
6
use crate :: task:: { Context , Poll } ;
7
7
8
8
pin_project ! {
9
- /// A `Stream` that is permanently closed once a single call to `poll` results in
10
- /// `Poll::Ready(None)`, returning `Poll::Ready(None)` for all future calls to `poll`.
9
+ /// A stream that yields `None` forever after the underlying stream yields `None` once.
11
10
///
12
11
/// This `struct` is created by the [`fuse`] method on [`Stream`]. See its
13
12
/// documentation for more.
Original file line number Diff line number Diff line change @@ -505,9 +505,11 @@ extension_trait! {
505
505
}
506
506
507
507
#[ doc = r#"
508
- Transforms this `Stream` into a "fused" `Stream` such that after the first time
509
- `poll` returns `Poll::Ready(None)`, all future calls to `poll` will also return
510
- `Poll::Ready(None)`.
508
+ Creates a stream which ends after the first `None`.
509
+
510
+ After a stream returns `None`, future calls may or may not yield `Some(T)` again.
511
+ `fuse()` adapts an iterator, ensuring that after a `None` is given, it will always
512
+ return `None` forever.
511
513
512
514
# Examples
513
515
You can’t perform that action at this time.
0 commit comments