Add a hash_set_entry tracking issue
This commit is contained in:
parent
5f938342ce
commit
5e2c9d38e9
1 changed files with 2 additions and 2 deletions
|
|
@ -635,7 +635,7 @@ impl<T, S> HashSet<T, S>
|
|||
/// assert_eq!(set.len(), 4); // 100 was inserted
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "hash_set_entry", issue = "0")]
|
||||
#[unstable(feature = "hash_set_entry", issue = "60896")]
|
||||
pub fn get_or_insert(&mut self, value: T) -> &T {
|
||||
self.map.raw_entry_mut().from_key(&value).or_insert(value, ()).0
|
||||
}
|
||||
|
|
@ -661,7 +661,7 @@ impl<T, S> HashSet<T, S>
|
|||
/// assert_eq!(set.len(), 4); // a new "fish" was inserted
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "hash_set_entry", issue = "0")]
|
||||
#[unstable(feature = "hash_set_entry", issue = "60896")]
|
||||
pub fn get_or_insert_with<Q: ?Sized, F>(&mut self, value: &Q, f: F) -> &T
|
||||
where T: Borrow<Q>,
|
||||
Q: Hash + Eq,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue