Skip to content

Commit e479425

Browse files
author
Cristi Burcă
committed
Fix example in HashMap::new() docs
1 parent 14cd5c5 commit e479425

File tree

1 file changed

+1
-1
lines changed
  • src/libstd/collections/hash

1 file changed

+1
-1
lines changed

src/libstd/collections/hash/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ impl<K: Hash + Eq, V> HashMap<K, V, RandomSipHasher> {
477477
///
478478
/// ```
479479
/// use std::collections::HashMap;
480-
/// let mut map: HashMap<&str, int> = HashMap::with_capacity(10);
480+
/// let mut map: HashMap<&str, int> = HashMap::new();
481481
/// ```
482482
#[inline]
483483
pub fn new() -> HashMap<K, V, RandomSipHasher> {

0 commit comments

Comments
 (0)