@@ -655,10 +655,12 @@ impl<K: Ord, V> BTreeMap<K, V> {
655
655
self . fix_right_edge ( ) ;
656
656
}
657
657
658
- /// Constructs a double-ended iterator over a sub-range of elements in the map, starting
659
- /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative
660
- /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity".
661
- /// Thus range(Unbounded, Unbounded) will yield the whole collection.
658
+ /// Constructs a double-ended iterator over a sub-range of elements in the map.
659
+ /// The simplest way is to use the range synax `min..max`, thus `range(..)` will
660
+ /// yield the whole collection.
661
+ /// The range may also be entered as `(Bound<T>, Bound<T>)`, so for example
662
+ /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive
663
+ /// range.
662
664
///
663
665
/// # Examples
664
666
///
@@ -745,10 +747,12 @@ impl<K: Ord, V> BTreeMap<K, V> {
745
747
}
746
748
}
747
749
748
- /// Constructs a mutable double-ended iterator over a sub-range of elements in the map, starting
749
- /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative
750
- /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity".
751
- /// Thus range(Unbounded, Unbounded) will yield the whole collection.
750
+ /// Constructs a mutable double-ended iterator over a sub-range of elements in the map.
751
+ /// The simplest way is to use the range synax `min..max`, thus `range(..)` will
752
+ /// yield the whole collection.
753
+ /// The range may also be entered as `(Bound<T>, Bound<T>)`, so for example
754
+ /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive
755
+ /// range.
752
756
///
753
757
/// # Examples
754
758
///
0 commit comments