Generic implementation of CompareContextElement.
This commit is contained in:
@@ -142,16 +142,3 @@ impl Walkable for String {
|
||||
Err(WalkError::CantWalk)
|
||||
}
|
||||
}
|
||||
|
||||
impl CompareContextElement for String {
|
||||
fn to_any(&self) -> &dyn Any {
|
||||
self
|
||||
}
|
||||
|
||||
fn equals(&self, other: &dyn ContextElement) -> bool {
|
||||
other
|
||||
.to_any()
|
||||
.downcast_ref::<Self>()
|
||||
.map_or(false, |a| self == a)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user