File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -397,14 +397,15 @@ macro_rules! repetition_utils {
397
397
/// [`hash_map!`] allows specifying the entries that make
398
398
/// up the [`HashMap`] where the key and value are separated by a `=>`.
399
399
///
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.
402
401
///
403
402
/// 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.
406
404
///
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
408
409
/// the argument size constantly passing it to the function itself.
409
410
///
410
411
/// # Examples
You can’t perform that action at this time.
0 commit comments