Skip to content

Commit a9447d1

Browse files
authored
Prevent confusion with insertion-ordered maps.
1 parent 859d029 commit a9447d1

File tree

1 file changed

+3
-2
lines changed
  • library/alloc/src/collections/btree

1 file changed

+3
-2
lines changed

library/alloc/src/collections/btree/map.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
4040

4141
/// An ordered map based on a [B-Tree].
4242
///
43-
/// An ordered map is a map in which the keys are totally ordered.
43+
/// Given a key type with a [total order], an ordered map stores its entries in key order.
4444
/// That means that keys must be of a type that implements the [`Ord`] trait,
4545
/// such that two keys can always be compared to determine their [`Ordering`].
46-
/// Examples of totally ordered keys are strings with lexicographical order,
46+
/// Examples of keys with a total order are strings with lexicographical order,
4747
/// and numbers with their natural order.
4848
///
4949
/// Iterators obtained from functions such as [`BTreeMap::iter`], [`BTreeMap::into_iter`], [`BTreeMap::values`], or
@@ -178,6 +178,7 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
178178
///
179179
/// [B-Tree]: https://en.wikipedia.org/wiki/B-tree
180180
/// [binary search tree]: https://en.wikipedia.org/wiki/Binary_search_tree
181+
/// [total order]: https://en.wikipedia.org/wiki/Total_order
181182
/// [`Cell`]: core::cell::Cell
182183
/// [`RefCell`]: core::cell::RefCell
183184
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)