Tweak insert docs
This commit is contained in:
@@ -126,9 +126,10 @@ impl<T: Eq + Hash> SsoHashSet<T> {
|
||||
|
||||
/// Adds a value to the set.
|
||||
///
|
||||
/// If the set did not have this value present, `true` is returned.
|
||||
/// Returns whether the value was newly inserted. That is:
|
||||
///
|
||||
/// If the set did have this value present, `false` is returned.
|
||||
/// - If the set did not previously contain this value, `true` is returned.
|
||||
/// - If the set already contained this value, `false` is returned.
|
||||
#[inline]
|
||||
pub fn insert(&mut self, elem: T) -> bool {
|
||||
self.map.insert(elem, ()).is_none()
|
||||
|
||||
Reference in New Issue
Block a user