File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 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 @@ -501,9 +501,11 @@ extension_trait! {
501
501
}
502
502
503
503
#[ doc = r#"
504
- Transforms this `Stream` into a "fused" `Stream` such that after the first time
505
- `poll` returns `Poll::Ready(None)`, all future calls to `poll` will also return
506
- `Poll::Ready(None)`.
504
+ Creates a stream which ends after the first `None`.
505
+
506
+ After a stream returns `None`, future calls may or may not yield `Some(T)` again.
507
+ `fuse()` adapts an iterator, ensuring that after a `None` is given, it will always
508
+ return `None` forever.
507
509
508
510
# Examples
509
511
You can’t perform that action at this time.
0 commit comments