Skip to content

Commit 450b864

Browse files
committed
Clean up 'HashMap' and 'HashSet' docs;
1 parent 550e035 commit 450b864

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

library/std/src/collections/hash/map.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl<K, V, S> HashMap<K, V, S> {
282282
/// manually using this function can expose a DoS attack vector.
283283
///
284284
/// The `hash_builder` passed should implement the [`BuildHasher`] trait for
285-
/// the HashMap to be useful, see its documentation for details.
285+
/// the `HashMap` to be useful, see its documentation for details.
286286
///
287287
/// # Examples
288288
///
@@ -314,7 +314,7 @@ impl<K, V, S> HashMap<K, V, S> {
314314
/// manually using this function can expose a DoS attack vector.
315315
///
316316
/// The `hasher` passed should implement the [`BuildHasher`] trait for
317-
/// the HashMap to be useful, see its documentation for details.
317+
/// the `HashMap` to be useful, see its documentation for details.
318318
///
319319
/// # Examples
320320
///
@@ -1283,7 +1283,7 @@ impl<K, V, S> HashMap<K, V, S>
12831283
where
12841284
S: BuildHasher,
12851285
{
1286-
/// Creates a raw entry builder for the HashMap.
1286+
/// Creates a raw entry builder for the `HashMap`.
12871287
///
12881288
/// Raw entries provide the lowest level of control for searching and
12891289
/// manipulating a map. They must be manually initialized with a hash and
@@ -1298,13 +1298,13 @@ where
12981298
/// * Using custom comparison logic without newtype wrappers
12991299
///
13001300
/// Because raw entries provide much more low-level control, it's much easier
1301-
/// to put the HashMap into an inconsistent state which, while memory-safe,
1301+
/// to put the `HashMap` into an inconsistent state which, while memory-safe,
13021302
/// will cause the map to produce seemingly random results. Higher-level and
13031303
/// more foolproof APIs like `entry` should be preferred when possible.
13041304
///
13051305
/// In particular, the hash used to initialize the raw entry must still be
13061306
/// consistent with the hash of the key that is ultimately stored in the entry.
1307-
/// This is because implementations of HashMap may need to recompute hashes
1307+
/// This is because implementations of `HashMap` may need to recompute hashes
13081308
/// when resizing, at which point only the keys are available.
13091309
///
13101310
/// Raw entries give mutable access to the keys. This must not be used
@@ -1320,7 +1320,7 @@ where
13201320
RawEntryBuilderMut { map: self }
13211321
}
13221322

1323-
/// Creates a raw immutable entry builder for the HashMap.
1323+
/// Creates a raw immutable entry builder for the `HashMap`.
13241324
///
13251325
/// Raw entries provide the lowest level of control for searching and
13261326
/// manipulating a map. They must be manually initialized with a hash and

library/std/src/collections/hash/set.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ impl<T, S> HashSet<T, S> {
374374
/// manually using this function can expose a DoS attack vector.
375375
///
376376
/// The `hash_builder` passed should implement the [`BuildHasher`] trait for
377-
/// the HashMap to be useful, see its documentation for details.
377+
/// the `HashSet` to be useful, see its documentation for details.
378378
///
379379
/// # Examples
380380
///
@@ -406,7 +406,7 @@ impl<T, S> HashSet<T, S> {
406406
/// manually using this function can expose a DoS attack vector.
407407
///
408408
/// The `hash_builder` passed should implement the [`BuildHasher`] trait for
409-
/// the HashMap to be useful, see its documentation for details.
409+
/// the `HashSet` to be useful, see its documentation for details.
410410
///
411411
/// # Examples
412412
///

0 commit comments

Comments
 (0)