Skip to content

Commit

Permalink
Rollup merge of #49452 - frewsxcv:frewsxcv-vec-cap-len, r=dtolnay
Browse files Browse the repository at this point in the history
Clarify "length" wording in `Vec::with_capacity`.

Fixes #49448.
  • Loading branch information
kennytm authored Mar 28, 2018
2 parents 03de75e + 0d15a3e commit 30560bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 30560bb

Please sign in to comment.