]> git.lizzy.rs Git - rust.git/commitdiff
Remove collection-specific `with_capacity` doc from `std::collections`
authorMarc <marc.gluyas@gmail.com>
Mon, 15 Apr 2019 01:19:38 +0000 (13:19 +1200)
committerMarc <marc.gluyas@gmail.com>
Mon, 15 Apr 2019 08:30:52 +0000 (20:30 +1200)
Fixes #59931

src/libstd/collections/mod.rs

index 286ce2d389b8ca78fb6c9d6b56a8fac044f70b82..15c2532f8b4e0b839645ca6885acc5cfbe7c306c 100644 (file)
 //! Any `with_capacity` constructor will instruct the collection to allocate
 //! enough space for the specified number of elements. Ideally this will be for
 //! exactly that many elements, but some implementation details may prevent
-//! this. [`Vec`] and [`VecDeque`] can be relied on to allocate exactly the
-//! requested amount, though. Use `with_capacity` when you know exactly how many
-//! elements will be inserted, or at least have a reasonable upper-bound on that
-//! number.
+//! this. See collection-specific documentation for details. In general, use
+//! `with_capacity` when you know exactly how many elements will be inserted, or
+//! at least have a reasonable upper-bound on that number.
 //!
 //! When anticipating a large influx of elements, the `reserve` family of
 //! methods can be used to hint to the collection how much room it should make