Skip to content

Commit 4d76440

Browse files
committed
Rollup merge of rust-lang#55896 - rust-lang:opt-fuse, r=shepmaster
Document optimizations enabled by FusedIterator When reading this I wondered what “some significant optimizations” referred to. As far as I can tell from reading code, the specialization of `.fuse()` is the only case where `FusedIterator` has any impact at all. Is this accurate @Stebalien?
2 parents 99986a5 + 4da9f10 commit 4d76440

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/iter/traits.rs

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

0 commit comments

Comments
 (0)