Derive more standard traits.

This commit is contained in:
Stephen Chung
2020-05-12 18:48:25 +08:00
parent 03c64688ad
commit ec67879759
7 changed files with 19 additions and 17 deletions

View File

@@ -64,6 +64,14 @@ pub struct StaticVec<T> {
more: Vec<T>,
}
impl<T: PartialEq> PartialEq for StaticVec<T> {
fn eq(&self, other: &Self) -> bool {
self.len == other.len && self.list == other.list && self.more == other.more
}
}
impl<T: Eq> Eq for StaticVec<T> {}
impl<T> Default for StaticVec<T> {
fn default() -> Self {
Self {