diff options
| author | djzin <noreply@github.com> | 2016-12-27 15:28:58 +0000 |
|---|---|---|
| committer | djzin <noreply@github.com> | 2017-01-14 16:51:52 +0000 |
| commit | 60bab567daefdf8de8de8b36d5dbe3da8dce95f6 (patch) | |
| tree | 3e4c026be88be4d1182b40cb05680f631039716f /src | |
| parent | b64df0b0a89cec5df0eb3a531d23d41840d1d9ee (diff) | |
| download | rust-60bab567daefdf8de8de8b36d5dbe3da8dce95f6.tar.gz rust-60bab567daefdf8de8de8b36d5dbe3da8dce95f6.zip | |
update docs with new syntax
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcollections/btree/map.rs | 20 | ||||
| -rw-r--r-- | src/libcollections/btree/set.rs | 10 |
2 files changed, 18 insertions, 12 deletions
diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index 7fb0041a97b..3136770e1e3 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -655,10 +655,12 @@ impl<K: Ord, V> BTreeMap<K, V> { self.fix_right_edge(); } - /// Constructs a double-ended iterator over a sub-range of elements in the map, starting - /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative - /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity". - /// Thus range(Unbounded, Unbounded) will yield the whole collection. + /// Constructs a double-ended iterator over a sub-range of elements in the map. + /// The simplest way is to use the range synax `min..max`, thus `range(..)` will + /// yield the whole collection. + /// The range may also be entered as `(Bound<T>, Bound<T>)`, so for example + /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive + /// range. /// /// # Examples /// @@ -745,10 +747,12 @@ impl<K: Ord, V> BTreeMap<K, V> { } } - /// Constructs a mutable double-ended iterator over a sub-range of elements in the map, starting - /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative - /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity". - /// Thus range(Unbounded, Unbounded) will yield the whole collection. + /// Constructs a mutable double-ended iterator over a sub-range of elements in the map. + /// The simplest way is to use the range synax `min..max`, thus `range(..)` will + /// yield the whole collection. + /// The range may also be entered as `(Bound<T>, Bound<T>)`, so for example + /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive + /// range. /// /// # Examples /// diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index 876b6bb8d6a..b19633fa7fb 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -207,10 +207,12 @@ impl<T> BTreeSet<T> { } impl<T: Ord> BTreeSet<T> { - /// Constructs a double-ended iterator over a sub-range of elements in the set, starting - /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative - /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity". - /// Thus range(Unbounded, Unbounded) will yield the whole collection. + /// Constructs a double-ended iterator over a sub-range of elements in the set. + /// The simplest way is to use the range synax `min..max`, thus `range(..)` will + /// yield the whole collection. + /// The range may also be entered as `(Bound<T>, Bound<T>)`, so for example + /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive + /// range. /// /// # Examples /// |
