diff options
| author | Corey Farwell <coreyf@rwell.org> | 2018-03-28 14:10:18 +0200 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2018-03-28 14:10:18 +0200 |
| commit | 0d15a3ee5402284450c312318871971f41603f80 (patch) | |
| tree | c23254a947bc4925d876dc125a58a18121f1ff29 /src/liballoc | |
| parent | bcffdf1b6da161eecd761eb4a3ef703ff05c33f6 (diff) | |
| download | rust-0d15a3ee5402284450c312318871971f41603f80.tar.gz rust-0d15a3ee5402284450c312318871971f41603f80.zip | |
Clarify "length" wording in `Vec::with_capacity`.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/vec.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 953f95876be..f8fc3f2bda1 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -334,9 +334,10 @@ impl<T> Vec<T> { /// The vector will be able to hold exactly `capacity` elements without /// reallocating. If `capacity` is 0, the vector will not allocate. /// - /// It is important to note that this function does not specify the *length* - /// of the returned vector, but only the *capacity*. For an explanation of - /// the difference between length and capacity, see *[Capacity and reallocation]*. + /// It is important to note that although the returned vector has the + /// *capacity* specified, the vector will have a zero *length*. For an + /// explanation of the difference between length and capacity, see + /// *[Capacity and reallocation]*. /// /// [Capacity and reallocation]: #capacity-and-reallocation /// |
