about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-11-13 13:03:24 +0800
committerkennytm <kennytm@gmail.com>2018-11-13 19:20:58 +0800
commit4d764407e959ac7a6bdba33b38eee4a3ffd97724 (patch)
treee28db30405ff10faa1e2f691ab6c3bf9690e2a9b
parent99986a5a057a02fb37e41c3e4fe20db1f75aa6cc (diff)
parent4da9f1069f16ec06912f85f0ca684f09f36d45a7 (diff)
downloadrust-4d764407e959ac7a6bdba33b38eee4a3ffd97724.tar.gz
rust-4d764407e959ac7a6bdba33b38eee4a3ffd97724.zip
Rollup merge of #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?
-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`]