diff --git a/src/ivec.rs b/src/ivec.rs index ebd7de395..99715cda8 100644 --- a/src/ivec.rs +++ b/src/ivec.rs @@ -295,6 +295,18 @@ impl PartialEq<[u8]> for IVec { impl Eq for IVec {} +impl PartialOrd for [u8] { + fn partial_cmp(&self, other: &IVec) -> Option { + <[u8] as PartialOrd<[u8]>>::partial_cmp(self, other) + } +} + +impl PartialEq for [u8] { + fn eq(&self, other: &IVec) -> bool { + self.eq(other.deref()) + } +} + impl fmt::Debug for IVec { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.as_ref().fmt(f)