Skip to content

Commit

Permalink
Rollup merge of #110047 - skaunov:patch-1, r=ChrisDenton
Browse files Browse the repository at this point in the history
Add link to `collections` docs to `extend` trait

I believe it would be useful here.
  • Loading branch information
JohnTitor authored Apr 14, 2023
2 parents 7879386 + 18ca509 commit 7361b17
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions library/std/src/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
//!
//! ## Iterators
//!
//! Iterators are a powerful and robust mechanism used throughout Rust's
//! [Iterators][crate::iter]
//! are a powerful and robust mechanism used throughout Rust's
//! standard libraries. Iterators provide a sequence of values in a generic,
//! safe, efficient and convenient way. The contents of an iterator are usually
//! *lazily* evaluated, so that only the values that are actually needed are
Expand Down Expand Up @@ -252,7 +253,9 @@
//!
//! Several other collection methods also return iterators to yield a sequence
//! of results but avoid allocating an entire collection to store the result in.
//! This provides maximum flexibility as `collect` or `extend` can be called to
//! This provides maximum flexibility as
//! [`collect`][crate::iter::Iterator::collect] or
//! [`extend`][crate::iter::Extend::extend] can be called to
//! "pipe" the sequence into any collection if desired. Otherwise, the sequence
//! can be looped over with a `for` loop. The iterator can also be discarded
//! after partial use, preventing the computation of the unused items.
Expand Down

0 comments on commit 7361b17

Please sign in to comment.