about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-01-20 22:32:50 +0100
committerGitHub <noreply@github.com>2018-01-20 22:32:50 +0100
commit4074893acd04938cfe71c2a36bf53fa54256ac5c (patch)
treed467da60533074b2913b4c80bad41831b3d43bb1 /src/libstd
parenta9672c236047a7df5da6c99d977574d561c2ef52 (diff)
parentfdf444da766715ec6bb181eb12b553333e925eb4 (diff)
downloadrust-4074893acd04938cfe71c2a36bf53fa54256ac5c.tar.gz
rust-4074893acd04938cfe71c2a36bf53fa54256ac5c.zip
Rollup merge of #47578 - arthurprs:btree-doc, r=alexcrichton
Update BTreeMap recommendation

Focus on the ordering / range(instead of all) benefit as it's the most important feature.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/mod.rs4
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.