Update BTreeMap recommendation
Focus on the ordering/range benefit.
This commit is contained in:
@@ -64,11 +64,11 @@
|
|||||||
//! * You want a map, with no extra functionality.
|
//! * You want a map, with no extra functionality.
|
||||||
//!
|
//!
|
||||||
//! ### Use a `BTreeMap` when:
|
//! ### 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'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
|
//! * You want to find the largest or smallest key that is smaller or larger
|
||||||
//! than something.
|
//! 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:
|
//! ### Use the `Set` variant of any of these `Map`s when:
|
||||||
//! * You just want to remember which keys you've seen.
|
//! * You just want to remember which keys you've seen.
|
||||||
|
|||||||
Reference in New Issue
Block a user