Skip to content

Commit 64dc041

Browse files
committed
Remove collection-specific with_capacity doc from std::collections
Fixes #59931
1 parent aa99abe commit 64dc041

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libstd/collections/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,9 @@
150150
//! Any `with_capacity` constructor will instruct the collection to allocate
151151
//! enough space for the specified number of elements. Ideally this will be for
152152
//! exactly that many elements, but some implementation details may prevent
153-
//! this. [`Vec`] and [`VecDeque`] can be relied on to allocate exactly the
154-
//! requested amount, though. Use `with_capacity` when you know exactly how many
155-
//! elements will be inserted, or at least have a reasonable upper-bound on that
156-
//! number.
153+
//! this. See collection-specific documentation for details. In general, use
154+
//! `with_capacity` when you know exactly how many elements will be inserted, or
155+
//! at least have a reasonable upper-bound on that number.
157156
//!
158157
//! When anticipating a large influx of elements, the `reserve` family of
159158
//! methods can be used to hint to the collection how much room it should make

0 commit comments

Comments
 (0)