@@ -181,14 +181,12 @@ pub enum DefaultHashBuilder {}
181181/// ```
182182/// use hashbrown::HashMap;
183183///
184- /// fn main() {
185- /// let timber_resources: HashMap<&str, i32> =
186- /// [("Norway", 100),
187- /// ("Denmark", 50),
188- /// ("Iceland", 10)]
189- /// .iter().cloned().collect();
190- /// // use the values stored in map
191- /// }
184+ /// let timber_resources: HashMap<&str, i32> =
185+ /// [("Norway", 100),
186+ /// ("Denmark", 50),
187+ /// ("Iceland", 10)]
188+ /// .iter().cloned().collect();
189+ /// // use the values stored in map
192190/// ```
193191#[ derive( Clone ) ]
194192pub struct HashMap < K , V , S = DefaultHashBuilder > {
@@ -903,12 +901,10 @@ where
903901 /// ```
904902 /// use hashbrown::HashMap;
905903 ///
906- /// # fn main() {
907904 /// let mut map = HashMap::new();
908905 /// map.insert(1, "a");
909906 /// assert_eq!(map.remove_entry(&1), Some((1, "a")));
910907 /// assert_eq!(map.remove(&1), None);
911- /// # }
912908 /// ```
913909 #[ cfg_attr( feature = "inline-more" , inline) ]
914910 pub fn remove_entry < Q : ?Sized > ( & mut self , k : & Q ) -> Option < ( K , V ) >
@@ -2283,14 +2279,12 @@ impl<'a, K, V: Default, S> Entry<'a, K, V, S> {
22832279 /// # Examples
22842280 ///
22852281 /// ```
2286- /// # fn main() {
22872282 /// use hashbrown::HashMap;
22882283 ///
22892284 /// let mut map: HashMap<&str, Option<u32>> = HashMap::new();
22902285 /// map.entry("poneyland").or_default();
22912286 ///
22922287 /// assert_eq!(map["poneyland"], None);
2293- /// # }
22942288 /// ```
22952289 #[ cfg_attr( feature = "inline-more" , inline) ]
22962290 pub fn or_default ( self ) -> & ' a mut V
0 commit comments