@@ -606,7 +606,7 @@ where
606606 }
607607
608608 /// Tries to reserve capacity for at least `additional` more elements to be inserted
609- /// in the given `HashMap<K,V>`. The collection may reserve more space to avoid
609+ /// in the given `HashMap<K, V>`. The collection may reserve more space to avoid
610610 /// frequent reallocations.
611611 ///
612612 /// # Errors
@@ -619,6 +619,7 @@ where
619619 /// ```
620620 /// #![feature(try_reserve)]
621621 /// use std::collections::HashMap;
622+ ///
622623 /// let mut map: HashMap<&str, isize> = HashMap::new();
623624 /// map.try_reserve(10).expect("why is the test harness OOMing on 10 bytes?");
624625 /// ```
@@ -898,14 +899,14 @@ where
898899
899900 /// Retains only the elements specified by the predicate.
900901 ///
901- /// In other words, remove all pairs `(k, v)` such that `f(&k,&mut v)` returns `false`.
902+ /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`.
902903 ///
903904 /// # Examples
904905 ///
905906 /// ```
906907 /// use std::collections::HashMap;
907908 ///
908- /// let mut map: HashMap<i32, i32> = (0..8).map(|x|(x, x*10)).collect();
909+ /// let mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
909910 /// map.retain(|&k, _| k % 2 == 0);
910911 /// assert_eq!(map.len(), 4);
911912 /// ```
0 commit comments