Skip to content

Commit 7361b17

Browse files
authored
Rollup merge of #110047 - skaunov:patch-1, r=ChrisDenton
Add link to `collections` docs to `extend` trait I believe it would be useful here.
2 parents 7879386 + 18ca509 commit 7361b17

File tree

1 file changed

+5
-2
lines changed
  • library/std/src/collections

1 file changed

+5
-2
lines changed

library/std/src/collections/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@
172172
//!
173173
//! ## Iterators
174174
//!
175-
//! Iterators are a powerful and robust mechanism used throughout Rust's
175+
//! [Iterators][crate::iter]
176+
//! are a powerful and robust mechanism used throughout Rust's
176177
//! standard libraries. Iterators provide a sequence of values in a generic,
177178
//! safe, efficient and convenient way. The contents of an iterator are usually
178179
//! *lazily* evaluated, so that only the values that are actually needed are
@@ -252,7 +253,9 @@
252253
//!
253254
//! Several other collection methods also return iterators to yield a sequence
254255
//! of results but avoid allocating an entire collection to store the result in.
255-
//! This provides maximum flexibility as `collect` or `extend` can be called to
256+
//! This provides maximum flexibility as
257+
//! [`collect`][crate::iter::Iterator::collect] or
258+
//! [`extend`][crate::iter::Extend::extend] can be called to
256259
//! "pipe" the sequence into any collection if desired. Otherwise, the sequence
257260
//! can be looped over with a `for` loop. The iterator can also be discarded
258261
//! after partial use, preventing the computation of the unused items.

0 commit comments

Comments
 (0)