diff --git a/src/lib.rs b/src/lib.rs index bb42697..d1f75f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ extern crate odds; extern crate nodrop; +use std::cmp; use std::iter; use std::mem; use std::ptr; @@ -642,3 +643,15 @@ impl Default for ArrayVec { ArrayVec::new() } } + +impl PartialOrd for ArrayVec where A::Item: PartialOrd { + fn partial_cmp(&self, other: &ArrayVec) -> Option { + (**self).partial_cmp(other) + } +} + +impl Ord for ArrayVec where A::Item: Ord { + fn cmp(&self, other: &ArrayVec) -> cmp::Ordering { + (**self).cmp(other) + } +}