Skip to content

Commit 8384dce

Browse files
aturonalexcrichton
authored andcommitted
A few minor fixes
1 parent e09403e commit 8384dce

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

active/0000-collections-conventions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ trait Predicate<T> {
855855

856856
impl<T: Eq> Predicate<T> for &T {
857857
fn check(&self, t: &T) -> bool {
858-
self == t
858+
*self == t
859859
}
860860
}
861861

@@ -1169,19 +1169,19 @@ functions to work with the capacity later on:
11691169
```rust
11701170
fn with_capacity(uint) -> Self
11711171
fn capacity(&self) -> uint
1172-
fn reserve(&mut self, uint)
1173-
fn reserve_exact(&mut self, uint)
1172+
fn reserve(&mut self, additional: uint)
1173+
fn reserve_exact(&mut self, additional: uint)
11741174
fn shrink_to_fit(&mut self)
11751175
```
11761176

11771177
There are some important changes from the current APIs:
11781178

11791179
* The `reserve` and `reserve_exact` methods now take as an argument the *extra*
11801180
space to reserve, rather than the final desired capacity, as this usage is
1181-
vastly more common. The `reserve` function will generally grow the capacity in
1182-
powers of two (as needed for amortization), while `reserve_exact` will reserve
1183-
exactly the requested additional capacity. The `reserve_additional` methods
1184-
are deprecated.
1181+
vastly more common. The `reserve` function may grow the capacity by a larger
1182+
amount than requested, to ensure amortization, while `reserve_exact` will
1183+
reserve exactly the requested additional capacity. The `reserve_additional`
1184+
methods are deprecated.
11851185

11861186
* The `with_capacity` constructor does *not* take any additional arguments, for
11871187
uniformity with `new`. This change affects `Bitv` in particular.
@@ -1199,7 +1199,7 @@ renaming:
11991199
fn iter_from(&self, k: &K) -> Entries<'a, K, V>
12001200
fn iter_from_mut(&mut self, k: &K) -> EntriesMut<'a, K, V>
12011201

1202-
Returns an iterator starting with the first key-value pair whose key is greater than k.
1202+
// Returns an iterator starting with the first key-value pair whose key is greater than k.
12031203
fn iter_above(&self, k: &K) -> Entries<'a, K, V>
12041204
fn iter_above_mut(&mut self, k: &K) -> EntriesMut <'a, K, V>
12051205
```

0 commit comments

Comments
 (0)