mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix(els): duplicated diagnostics
This commit is contained in:
parent
72ef581522
commit
5497af5626
4 changed files with 25 additions and 6 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue