diff options
| author | Marijn Schouten <hkBst@users.noreply.github.com> | 2025-01-22 10:05:55 +0100 |
|---|---|---|
| committer | Marijn Schouten <mhkbst@gmail.com> | 2025-08-24 10:50:20 +0000 |
| commit | 1b773870854bac0fa898be2e5d1ba7d44d16b83c (patch) | |
| tree | 5b1f4b92d6fdc807c2039cbeedc3cdf178bc3387 /library/alloc | |
| parent | bb7993f80793ee4dce16f77532dc44c0048b3261 (diff) | |
| download | rust-1b773870854bac0fa898be2e5d1ba7d44d16b83c.tar.gz rust-1b773870854bac0fa898be2e5d1ba7d44d16b83c.zip | |
Prevent confusion with insertion-ordered maps.
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/src/collections/btree/map.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index b23a62c5545..8b6d86a2888 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -40,10 +40,10 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT; /// An ordered map based on a [B-Tree]. /// -/// An ordered map is a map in which the keys are totally ordered. +/// Given a key type with a [total order], an ordered map stores its entries in key order. /// That means that keys must be of a type that implements the [`Ord`] trait, /// such that two keys can always be compared to determine their [`Ordering`]. -/// Examples of totally ordered keys are strings with lexicographical order, +/// Examples of keys with a total order are strings with lexicographical order, /// and numbers with their natural order. /// /// Iterators obtained from functions such as [`BTreeMap::iter`], [`BTreeMap::into_iter`], [`BTreeMap::values`], or @@ -180,6 +180,7 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT; /// /// [B-Tree]: https://en.wikipedia.org/wiki/B-tree /// [binary search tree]: https://en.wikipedia.org/wiki/Binary_search_tree +/// [total order]: https://en.wikipedia.org/wiki/Total_order /// [`Cell`]: core::cell::Cell /// [`RefCell`]: core::cell::RefCell #[stable(feature = "rust1", since = "1.0.0")] |
