Skip to content

Commit 4401a69

Browse files
committed
Prevent confusion with insertion-ordered maps.
1 parent 6600102 commit 4401a69

File tree

1 file changed

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

1 file changed

+3
-2
lines changed

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
@@ -180,6 +180,7 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
180180
///
181181
/// [B-Tree]: https://en.wikipedia.org/wiki/B-tree
182182
/// [binary search tree]: https://en.wikipedia.org/wiki/Binary_search_tree
183+
/// [total order]: https://en.wikipedia.org/wiki/Total_order
183184
/// [`Cell`]: core::cell::Cell
184185
/// [`RefCell`]: core::cell::RefCell
185186
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)