From 49e77dbf25ed6526fb5d37c32e55797fb04522f0 Mon Sep 17 00:00:00 2001 From: athulappadan Date: Sun, 11 Sep 2016 17:00:09 +0530 Subject: Documentation of what does for each type --- src/libstd/collections/hash/map.rs | 2 ++ src/libstd/collections/hash/set.rs | 1 + 2 files changed, 3 insertions(+) (limited to 'src/libstd/collections') diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 4eb2c8f0644..48c54c16ed8 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1218,6 +1218,7 @@ impl Default for HashMap where K: Eq + Hash, S: BuildHasher + Default, { + /// Creates a `HashMap`, with initial `Default` hasher. fn default() -> HashMap { HashMap::with_hasher(Default::default()) } @@ -2026,6 +2027,7 @@ impl Hasher for DefaultHasher { #[stable(feature = "rust1", since = "1.0.0")] impl Default for RandomState { + /// Constructs a new `RandomState`. #[inline] fn default() -> RandomState { RandomState::new() diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index ca5137e9573..b5652bcabf1 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -665,6 +665,7 @@ impl Default for HashSet where T: Eq + Hash, S: BuildHasher + Default, { + /// Creates a `HashSet` with initial `Default` hasher. fn default() -> HashSet { HashSet::with_hasher(Default::default()) } -- cgit 1.4.1-3-g733a5