Skip to content

Commit fdf444d

Browse files
committed
Update BTreeMap recommendation
Focus on the ordering/range benefit.
1 parent 0b56ab0 commit fdf444d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/collections/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@
6464
//! * You want a map, with no extra functionality.
6565
//!
6666
//! ### Use a `BTreeMap` when:
67+
//! * You want a map sorted by its keys.
68+
//! * You want to be able to get a range of entries on-demand.
6769
//! * You're interested in what the smallest or largest key-value pair is.
6870
//! * You want to find the largest or smallest key that is smaller or larger
6971
//! than something.
70-
//! * You want to be able to get all of the entries in order on-demand.
71-
//! * You want a map sorted by its keys.
7272
//!
7373
//! ### Use the `Set` variant of any of these `Map`s when:
7474
//! * You just want to remember which keys you've seen.

0 commit comments

Comments
 (0)