@@ -198,9 +198,9 @@ impl DefaultResizePolicy {
198
198
/// attacks such as HashDoS.
199
199
///
200
200
/// The hashing algorithm can be replaced on a per-`HashMap` basis using the
201
- /// `HashMap::default`, `HashMap::with_hasher`, and
202
- /// `HashMap::with_capacity_and_hasher` methods. Many alternative algorithms
203
- /// are available on crates.io, such as the `fnv` crate.
201
+ /// [ `HashMap::default`], [ `HashMap::with_hasher`] , and
202
+ /// [ `HashMap::with_capacity_and_hasher`] methods. Many alternative algorithms
203
+ /// are available on crates.io, such as the [ `fnv`] crate.
204
204
///
205
205
/// It is required that the keys implement the [`Eq`] and [`Hash`] traits, although
206
206
/// this can frequently be achieved by using `#[derive(PartialEq, Eq, Hash)]`.
@@ -302,6 +302,10 @@ impl DefaultResizePolicy {
302
302
/// [`PartialEq`]: ../../std/cmp/trait.PartialEq.html
303
303
/// [`RefCell`]: ../../std/cell/struct.RefCell.html
304
304
/// [`Cell`]: ../../std/cell/struct.Cell.html
305
+ /// [`HashMap::default`]: #method.default
306
+ /// [`HashMap::with_hasher`]: #method.with_hasher
307
+ /// [`HashMap::with_capacity_and_hasher`]: #method.with_capacity_and_hasher
308
+ /// [`fnv`]: https://crates.io/crates/fnv
305
309
///
306
310
/// ```
307
311
/// use std::collections::HashMap;
@@ -680,7 +684,9 @@ impl<K, V, S> HashMap<K, V, S>
680
684
///
681
685
/// # Panics
682
686
///
683
- /// Panics if the new allocation size overflows `usize`.
687
+ /// Panics if the new allocation size overflows [`usize`].
688
+ ///
689
+ /// [`usize`]: ../../std/primitive.usize.html
684
690
///
685
691
/// # Examples
686
692
///
@@ -1141,13 +1147,14 @@ impl<K, V, S> HashMap<K, V, S>
1141
1147
1142
1148
/// Inserts a key-value pair into the map.
1143
1149
///
1144
- /// If the map did not have this key present, `None` is returned.
1150
+ /// If the map did not have this key present, [ `None`] is returned.
1145
1151
///
1146
1152
/// If the map did have this key present, the value is updated, and the old
1147
1153
/// value is returned. The key is not updated, though; this matters for
1148
1154
/// types that can be `==` without being identical. See the [module-level
1149
1155
/// documentation] for more.
1150
1156
///
1157
+ /// [`None`]: ../../std/option/enum.Option.html#variant.None
1151
1158
/// [module-level documentation]: index.html#insert-and-complex-keys
1152
1159
///
1153
1160
/// # Examples
0 commit comments