From 41881e85bd832127f2a6eee5821eaae353dea281 Mon Sep 17 00:00:00 2001 From: athulappadan Date: Sun, 11 Sep 2016 22:58:01 +0530 Subject: Documentation for default types modified --- src/libstd/collections/hash/map.rs | 2 +- src/libstd/collections/hash/set.rs | 2 +- src/libstd/ffi/c_str.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 48c54c16ed8..eb1653f18cb 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1218,7 +1218,7 @@ impl Default for HashMap where K: Eq + Hash, S: BuildHasher + Default, { - /// Creates a `HashMap`, with initial `Default` hasher. + /// Creates an empty `HashMap`, with the `Default` value for the hasher. fn default() -> HashMap { HashMap::with_hasher(Default::default()) } diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index b5652bcabf1..ff56747fee6 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -665,7 +665,7 @@ impl Default for HashSet where T: Eq + Hash, S: BuildHasher + Default, { - /// Creates a `HashSet` with initial `Default` hasher. + /// Creates an empty `HashSet` with the `Default` value for the hasher. fn default() -> HashSet { HashSet::with_hasher(Default::default()) } diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 044112ea136..0f7dc3889f0 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -339,7 +339,7 @@ impl<'a> Default for &'a CStr { #[stable(feature = "cstr_default", since = "1.10.0")] impl Default for CString { - /// Creates a new `CString`, by calling the `Default` of `CStr`, and then owns it. + /// Creates an empty `CString`. fn default() -> CString { let a: &CStr = Default::default(); a.to_owned() -- cgit 1.4.1-3-g733a5