diff options
| author | Sergey Kaunov <65976143+skaunov@users.noreply.github.com> | 2023-04-07 13:18:31 +0300 |
|---|---|---|
| committer | serge <serge@pop-os.localdomain> | 2023-04-14 11:28:24 +0300 |
| commit | 18ca509e99cb3b7741e3d1124e59adb53f87f1ea (patch) | |
| tree | 24f0f3324ce13ae71fe44ea573bbfd65f960dd03 | |
| parent | 97879ce24ba6fbc89b1a7a9bef5d31f73963646c (diff) | |
| download | rust-18ca509e99cb3b7741e3d1124e59adb53f87f1ea.tar.gz rust-18ca509e99cb3b7741e3d1124e59adb53f87f1ea.zip | |
Add links to docs to `Iterator`
and couple of its methods
| -rw-r--r-- | library/std/src/collections/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/std/src/collections/mod.rs b/library/std/src/collections/mod.rs index ae2baba09e6..75515d1f5d3 100644 --- a/library/std/src/collections/mod.rs +++ b/library/std/src/collections/mod.rs @@ -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 @@ -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. |
