diff options
| author | bors <bors@rust-lang.org> | 2015-04-15 01:05:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-15 01:05:03 +0000 |
| commit | 16e1fcead14628701e1b10b9d00c898d748db2ed (patch) | |
| tree | 37d18d85fa9631880c287c3795d5b4b3d8994f20 /src/libstd/collections | |
| parent | 8415fa27877a4309a79b08c75a52eb4c3546b7a5 (diff) | |
| parent | e053571df21fda7bb909c1b79de9b0cbe1a2931d (diff) | |
| download | rust-16e1fcead14628701e1b10b9d00c898d748db2ed.tar.gz rust-16e1fcead14628701e1b10b9d00c898d748db2ed.zip | |
Auto merge of #24433 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/collections')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 10 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 54a3a055768..f554a4f4ed6 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -506,7 +506,7 @@ impl<K, V, S> HashMap<K, V, S> } impl<K: Hash + Eq, V> HashMap<K, V, RandomState> { - /// Create an empty HashMap. + /// Creates an empty HashMap. /// /// # Examples /// @@ -563,7 +563,7 @@ impl<K, V, S> HashMap<K, V, S> } } - /// Create an empty HashMap with space for at least `capacity` + /// Creates an empty HashMap with space for at least `capacity` /// elements, using `hasher` to hash the keys. /// /// Warning: `hasher` is normally randomly generated, and @@ -1596,7 +1596,7 @@ pub struct RandomState { #[unstable(feature = "std_misc", reason = "hashing an hash maps may be altered")] impl RandomState { - /// Construct a new `RandomState` that is initialized with random keys. + /// Constructs a new `RandomState` that is initialized with random keys. #[inline] #[allow(deprecated)] pub fn new() -> RandomState { @@ -1631,7 +1631,7 @@ mod test_map { use super::Entry::{Occupied, Vacant}; use iter::{range_inclusive, range_step_inclusive, repeat}; use cell::RefCell; - use rand::{weak_rng, Rng}; + use rand::{thread_rng, Rng}; #[test] fn test_create_capacity_zero() { @@ -2290,7 +2290,7 @@ mod test_map { } let mut m = HashMap::new(); - let mut rng = weak_rng(); + let mut rng = thread_rng(); // Populate the map with some items. for _ in 0..50 { diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index f897d565321..6b0546b1ee7 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -111,7 +111,7 @@ pub struct HashSet<T, S = RandomState> { } impl<T: Hash + Eq> HashSet<T, RandomState> { - /// Create an empty HashSet. + /// Creates an empty HashSet. /// /// # Examples /// @@ -125,7 +125,7 @@ impl<T: Hash + Eq> HashSet<T, RandomState> { HashSet::with_capacity(INITIAL_CAPACITY) } - /// Create an empty HashSet with space for at least `n` elements in + /// Creates an empty HashSet with space for at least `n` elements in /// the hash table. /// /// # Examples @@ -166,7 +166,7 @@ impl<T, S> HashSet<T, S> HashSet::with_capacity_and_hash_state(INITIAL_CAPACITY, hash_state) } - /// Create an empty HashSet with space for at least `capacity` + /// Creates an empty HashSet with space for at least `capacity` /// elements in the hash table, using `hasher` to hash the keys. /// /// Warning: `hasher` is normally randomly generated, and @@ -402,7 +402,7 @@ impl<T, S> HashSet<T, S> Union { iter: self.iter().chain(other.difference(self)) } } - /// Return the number of elements in the set + /// Returns the number of elements in the set. /// /// # Examples /// @@ -417,7 +417,7 @@ impl<T, S> HashSet<T, S> #[stable(feature = "rust1", since = "1.0.0")] pub fn len(&self) -> usize { self.map.len() } - /// Returns true if the set contains no elements + /// Returns true if the set contains no elements. /// /// # Examples /// |
