fix(els): duplicated diagnostics

This commit is contained in:
Shunsuke Shibayama 2023-09-16 12:14:24 +09:00
parent 72ef581522
commit 5497af5626
4 changed files with 25 additions and 6 deletions

View file

@ -205,6 +205,18 @@ impl<T: Hash + Eq> Set<T> {
pub fn retain(&mut self, f: impl FnMut(&T) -> bool) {
self.elems.retain(f);
}
#[inline]
pub fn clear(&mut self) {
self.elems.clear();
}
#[inline]
pub fn take_all(&mut self) -> Self {
Self {
elems: self.elems.drain().collect(),
}
}
}
impl<T: Hash + Eq + Clone> Set<T> {