fn fuse(self) -> Fuse<Self>
    where
        Self: Sized,
    {
        assert_stream::<Self::Item, _>(Fuse::new(self))
    }
Fuse a stream such that [`poll_next`](Stream::poll_next) will never
again be called once it has finished. This method can be used to turn
any `Stream` into a `FusedStream`.

Normally, once a stream has returned [`None`] from
[`poll_next`](Stream::poll_next) any further calls could exhibit bad
behavior such as block forever, panic, never return, etc. If it is known
that [`poll_next`](Stream::poll_next) may be called after stream
has already finished, then this method can be used to ensure that it has
defined semantics.

The [`poll_next`](Stream::poll_next) method of a `fuse`d stream
is guaranteed to return [`None`] after the underlying stream has
finished.

# Examples

```
use futures::executor::block_on_stream;
use futures::stream::{self, StreamExt};
use futures::task::Poll;

let mut x = 0;
let stream = stream::poll_fn(|_| {
x += 1;
match x {
0..=2 => Poll::Ready(Some(x)),
3 => Poll::Ready(None),
_ => panic!("should not happen")
}
}).fuse();

let mut iter = block_on_stream(stream);
assert_eq!(Some(1), iter.next());
assert_eq!(Some(2), iter.next());
assert_eq!(None, iter.next());
assert_eq!(None, iter.next());
// ...
```
futures-util/src/stream/stream/mod.rs