Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
use std::any::Any;
pub trait DynamicEq {
fn dynamic_eq(&self, other: &dyn Any) -> bool;
}
impl<T: PartialEq + 'static> DynamicEq for T {
fn dynamic_eq(&self, other: &dyn Any) -> bool {
other
.downcast_ref()
.map_or(false, |other| self == other)
}
}
da606293eThis file is pinned to the selected release. Download the original to open it in your design tool.