File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1139,6 +1139,10 @@ pub trait StreamExt: Stream {
11391139
11401140 /// Maps items while `predicate` returns [`Some`].
11411141 ///
1142+ /// This stream is not fused. After the predicate returns [`None`] the stream still
1143+ /// contains remaining items that can be obtained by subsequent `next` calls.
1144+ /// You can [`fuse`](StreamExt::fuse) the stream if this behavior is undesirable.
1145+ ///
11421146 /// # Examples
11431147 ///
11441148 /// ```
@@ -1151,6 +1155,10 @@ pub trait StreamExt: Stream {
11511155 /// assert_eq!(s.next().await, Some(0));
11521156 /// assert_eq!(s.next().await, Some(1));
11531157 /// assert_eq!(s.next().await, None);
1158+ ///
1159+ /// // Continue to iterate the stream.
1160+ /// assert_eq!(s.next().await, Some(2));
1161+ /// assert_eq!(s.next().await, None);
11541162 /// # });
11551163 /// ```
11561164 fn map_while < B , P > ( self , predicate : P ) -> MapWhile < Self , P >
You can’t perform that action at this time.
0 commit comments