about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-11-12 12:22:33 +0100
committerGitHub <noreply@github.com>2018-11-12 12:22:33 +0100
commit4da9f1069f16ec06912f85f0ca684f09f36d45a7 (patch)
tree26b37b0047cfb8723b40ad9580d78814c3bc27da
parent0195812aeafeecaa8760a4ddceae187472db8fe6 (diff)
downloadrust-4da9f1069f16ec06912f85f0ca684f09f36d45a7.tar.gz
rust-4da9f1069f16ec06912f85f0ca684f09f36d45a7.zip
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?
-rw-r--r--src/libcore/iter/traits.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs
index f95f8e7dbcb..d2c5a3bed28 100644
--- a/src/libcore/iter/traits.rs
+++ b/src/libcore/iter/traits.rs
@@ -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`]