diff --git a/src/slice.rs b/src/slice.rs index 85abfb8e0..399e8e694 100644 --- a/src/slice.rs +++ b/src/slice.rs @@ -295,6 +295,25 @@ pub struct SliceInfo { indices: T, } +impl PartialEq> for SliceInfo +where + T1: AsRef<[SliceOrIndex]>, + T2: AsRef<[SliceOrIndex]>, + D1: Dimension, + D2: Dimension, +{ + fn eq(&self, other: &SliceInfo) -> bool { + self.indices.as_ref() == other.indices.as_ref() + } +} + +impl Eq for SliceInfo +where + T: AsRef<[SliceOrIndex]>, + D: Dimension, +{ +} + impl Deref for SliceInfo where D: Dimension,