more iter functions

This commit is contained in:
Mark
2023-10-27 19:19:29 +02:00
parent 6077de8370
commit a30ba84691
2 changed files with 96 additions and 76 deletions

View File

@@ -323,7 +323,8 @@ impl Type {
impl MersType for Type {
fn is_same_type_as(&self, other: &dyn MersType) -> bool {
todo!()
// TODO! improve
self.is_included_in(other) && other.is_included_in(self)
}
fn is_included_in_single(&self, target: &dyn MersType) -> bool {
self.types.iter().all(|t| t.is_included_in_single(target))