diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-02-04 14:41:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-04 14:41:24 +0100 |
| commit | 2ce93c1cd2f3f076c67d59655f07d02621dec70a (patch) | |
| tree | 74abd2fdb52d2e55c01ddf3e2c5474b5c7bb4401 /src/libstd | |
| parent | d81b440e92eec0f7dd0bebc7717cb99fac0bd3cc (diff) | |
| parent | 2a8ee8c80406c95757f7e27ec81b303e241756f3 (diff) | |
| download | rust-2ce93c1cd2f3f076c67d59655f07d02621dec70a.tar.gz rust-2ce93c1cd2f3f076c67d59655f07d02621dec70a.zip | |
Rollup merge of #39506 - GuillaumeGomez:hashmap_docs, r=frewsxcv
Add missing urls in HashMap r? @frewsxcv
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index a314717a877..8058972e750 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -198,9 +198,9 @@ impl DefaultResizePolicy { /// attacks such as HashDoS. /// /// The hashing algorithm can be replaced on a per-`HashMap` basis using the -/// `HashMap::default`, `HashMap::with_hasher`, and -/// `HashMap::with_capacity_and_hasher` methods. Many alternative algorithms -/// are available on crates.io, such as the `fnv` crate. +/// [`HashMap::default`], [`HashMap::with_hasher`], and +/// [`HashMap::with_capacity_and_hasher`] methods. Many alternative algorithms +/// are available on crates.io, such as the [`fnv`] crate. /// /// It is required that the keys implement the [`Eq`] and [`Hash`] traits, although /// this can frequently be achieved by using `#[derive(PartialEq, Eq, Hash)]`. @@ -302,6 +302,10 @@ impl DefaultResizePolicy { /// [`PartialEq`]: ../../std/cmp/trait.PartialEq.html /// [`RefCell`]: ../../std/cell/struct.RefCell.html /// [`Cell`]: ../../std/cell/struct.Cell.html +/// [`HashMap::default`]: #method.default +/// [`HashMap::with_hasher`]: #method.with_hasher +/// [`HashMap::with_capacity_and_hasher`]: #method.with_capacity_and_hasher +/// [`fnv`]: https://crates.io/crates/fnv /// /// ``` /// use std::collections::HashMap; @@ -680,7 +684,9 @@ impl<K, V, S> HashMap<K, V, S> /// /// # Panics /// - /// Panics if the new allocation size overflows `usize`. + /// Panics if the new allocation size overflows [`usize`]. + /// + /// [`usize`]: ../../std/primitive.usize.html /// /// # Examples /// @@ -1141,13 +1147,14 @@ impl<K, V, S> HashMap<K, V, S> /// Inserts a key-value pair into the map. /// - /// If the map did not have this key present, `None` is returned. + /// If the map did not have this key present, [`None`] is returned. /// /// If the map did have this key present, the value is updated, and the old /// value is returned. The key is not updated, though; this matters for /// types that can be `==` without being identical. See the [module-level /// documentation] for more. /// + /// [`None`]: ../../std/option/enum.Option.html#variant.None /// [module-level documentation]: index.html#insert-and-complex-keys /// /// # Examples |
