improvements and fixes
This commit is contained in:
@ -33,6 +33,7 @@ where
|
||||
fn len(&self) -> usize;
|
||||
fn is_empty(&self) -> bool;
|
||||
fn contains(&self, el: &Self::Element) -> bool;
|
||||
fn add(&mut self, el: Self::Element);
|
||||
}
|
||||
|
||||
pub trait ExtensionsSet {
|
||||
@ -140,6 +141,10 @@ impl BasicSet for Set {
|
||||
fn contains(&self, el: &Self::Element) -> bool {
|
||||
self.identifiers.contains(el)
|
||||
}
|
||||
|
||||
fn add(&mut self, el: Self::Element) {
|
||||
self.identifiers.insert(el);
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for Set {
|
||||
@ -488,6 +493,10 @@ impl BasicSet for PositiveSet {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fn add(&mut self, el: Self::Element) {
|
||||
self.identifiers.insert(el.id, el.state);
|
||||
}
|
||||
}
|
||||
|
||||
impl PrintableWithTranslator for PositiveSet {
|
||||
|
||||
Reference in New Issue
Block a user