Document optimizations enabled by FusedIterator

When reading this I wondered what “some significant optimizations” referred to. As far as I can tell, the specialization of `.fuse()` is the only case where `FusedIterator` has any impact at all. Is this accurate @Stebalien?
This commit is contained in:
Simon Sapin 2018-11-12 12:22:33 +01:00 committed by GitHub
parent 0195812aea
commit 4da9f1069f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -960,7 +960,7 @@ impl<T, U, E> Product<Result<U, E>> for Result<T, E>
///
/// Calling next on a fused iterator that has returned `None` once is guaranteed
/// to return [`None`] again. This trait should be implemented by all iterators
/// that behave this way because it allows for some significant optimizations.
/// that behave this way because it allows optimizing [`Iterator::fuse`].
///
/// Note: In general, you should not use `FusedIterator` in generic bounds if
/// you need a fused iterator. Instead, you should just call [`Iterator::fuse`]