diff --git a/core/src/value.rs b/core/src/value.rs index 3a492a3005..275847f765 100644 --- a/core/src/value.rs +++ b/core/src/value.rs @@ -1,10 +1,11 @@ use crate::internal::*; +use std::ops::Deref; use std::rc::Rc; use tract_ndarray::Array; use TValue::*; -#[derive(Clone, PartialEq, Eq)] +#[derive(Clone, Eq)] pub enum TValue { Const(Arc), Var(Rc), @@ -16,6 +17,12 @@ impl std::fmt::Debug for TValue { } } +impl PartialEq for TValue { + fn eq(&self, other: &Self) -> bool { + self.deref() == other.deref() + } +} + impl TValue { pub fn is_exclusive(&self) -> bool { match self {