diff options
| author | Arthur Silva <arthurprs@gmail.com> | 2018-01-19 15:40:02 +0100 |
|---|---|---|
| committer | arthurprs <arthurprs@gmail.com> | 2018-01-19 15:40:58 +0100 |
| commit | fdf444da766715ec6bb181eb12b553333e925eb4 (patch) | |
| tree | d95018d4a5f0472b629802c49a877650c4bc45ef /src/libstd | |
| parent | 0b56ab0f7b0c5e01611b7ea6a28c77bc09c26275 (diff) | |
| download | rust-fdf444da766715ec6bb181eb12b553333e925eb4.tar.gz rust-fdf444da766715ec6bb181eb12b553333e925eb4.zip | |
Update BTreeMap recommendation
Focus on the ordering/range benefit.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs index b8a6a66eaa6..e9a150f34a5 100644 --- a/src/libstd/collections/mod.rs +++ b/src/libstd/collections/mod.rs @@ -64,11 +64,11 @@ //! * You want a map, with no extra functionality. //! //! ### Use a `BTreeMap` when: +//! * You want a map sorted by its keys. +//! * You want to be able to get a range of entries on-demand. //! * You're interested in what the smallest or largest key-value pair is. //! * You want to find the largest or smallest key that is smaller or larger //! than something. -//! * You want to be able to get all of the entries in order on-demand. -//! * You want a map sorted by its keys. //! //! ### Use the `Set` variant of any of these `Map`s when: //! * You just want to remember which keys you've seen. |
