Skip to content

Commit 258a038

Browse files
committed
docs: re-write documentation for better looks
1 parent 5e22c59 commit 258a038

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

library/std/src/macros.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,14 +397,15 @@ macro_rules! repetition_utils {
397397
/// [`hash_map!`] allows specifying the entries that make
398398
/// up the [`HashMap`] where the key and value are separated by a `=>`.
399399
///
400-
/// The entries are separated by commas, where a trailing comma can be used
401-
/// for purposes like macro generation as well as many other things...
400+
/// The entries are separated by commas with a trailing comma being allowed.
402401
///
403402
/// It is semantically equivalent to using repeated [`HashMap::insert`]
404-
/// on a newly created hashmap. On the other hand, calling [`hash_map!`]
405-
/// without any argument is equivalent to invoking [`HashMap::new`].
403+
/// on a newly created hashmap.
406404
///
407-
/// A non empty [`hash_map!`] invocation calls [`HashMap::with_capacity`] and evaluates
405+
/// [`hash_map!`] will attempt to avoid repeated reallocations by
406+
/// using [`HashMap::with_capacity`].
407+
///
408+
/// A non-empty [`hash_map!`] invocation calls [`HashMap::with_capacity`] and evaluates
408409
/// the argument size constantly passing it to the function itself.
409410
///
410411
/// # Examples

0 commit comments

Comments
 (0)