about summary refs log tree commit diff
path: root/src/liballoc/collections
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-10-01 11:55:46 +0000
committerLzu Tao <taolzu@gmail.com>2019-10-01 11:55:46 +0000
commit6c1b447f2e67f5eae89394344ade698aca3ec7e6 (patch)
treece37bd636efc867ab133b5c78c7da745da2939ba /src/liballoc/collections
parentd16ee891c63e2441ba97072a83fa79b0b6e6e01a (diff)
downloadrust-6c1b447f2e67f5eae89394344ade698aca3ec7e6.tar.gz
rust-6c1b447f2e67f5eae89394344ade698aca3ec7e6.zip
Remove unneeded `fn main` blocks from docs
Diffstat (limited to 'src/liballoc/collections')
-rw-r--r--src/liballoc/collections/btree/map.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs
index ddf012d1502..83fd4485f73 100644
--- a/src/liballoc/collections/btree/map.rs
+++ b/src/liballoc/collections/btree/map.rs
@@ -2226,14 +2226,12 @@ impl<'a, K: Ord, V: Default> Entry<'a, K, V> {
     /// # Examples
     ///
     /// ```
-    /// # fn main() {
     /// use std::collections::BTreeMap;
     ///
     /// let mut map: BTreeMap<&str, Option<usize>> = BTreeMap::new();
     /// map.entry("poneyland").or_default();
     ///
     /// assert_eq!(map["poneyland"], None);
-    /// # }
     /// ```
     pub fn or_default(self) -> &'a mut V {
         match self {