Show that the capacity changed in HashSet::reserve doc example.

This commit is contained in:
Corey Farwell 2017-08-01 07:42:59 -04:00
parent 881062776a
commit 9e19260286

View File

@ -260,6 +260,7 @@ impl<T, S> HashSet<T, S>
/// use std::collections::HashSet;
/// let mut set: HashSet<i32> = HashSet::new();
/// set.reserve(10);
/// assert!(set.capacity() >= 10);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn reserve(&mut self, additional: usize) {