diff --git a/src/offset_arc.rs b/src/offset_arc.rs index 5164d5b..0dde04a 100644 --- a/src/offset_arc.rs +++ b/src/offset_arc.rs @@ -1,4 +1,5 @@ use core::fmt; +use core::hash::Hash; use core::marker::PhantomData; use core::mem::ManuallyDrop; use core::ops::Deref; @@ -84,6 +85,24 @@ impl PartialEq for OffsetArc { impl Eq for OffsetArc {} +impl PartialOrd for OffsetArc { + fn partial_cmp(&self, other: &Self) -> Option { + (**self).partial_cmp(&**other) + } +} + +impl Ord for OffsetArc { + fn cmp(&self, other: &Self) -> core::cmp::Ordering { + (**self).cmp(&**other) + } +} + +impl Hash for OffsetArc { + fn hash(&self, state: &mut H) { + (**self).hash(state) + } +} + impl OffsetArc { /// If uniquely owned, provide a mutable reference /// Else create a copy, and mutate that