feat: Add useful derivable traits to IndexedValues types

This commit is contained in:
Kerollmops 2018-05-12 13:47:57 +02:00 committed by Clément Renault
parent 33801f1d23
commit 70b079d79d

View File

@ -231,7 +231,7 @@ impl<'a, 'm, 'v, T: 'v + 'a> fst::Streamer<'a> for Union<'m, 'v, T> {
} }
} }
#[derive(Debug)] #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct IndexedValues<'a, T: 'a> { pub struct IndexedValues<'a, T: 'a> {
pub index: usize, pub index: usize,
pub values: &'a [T], pub values: &'a [T],
@ -305,7 +305,7 @@ where
} }
} }
#[derive(Debug)] #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct IndexedValuesWithState<'a, T: 'a, U> { pub struct IndexedValuesWithState<'a, T: 'a, U> {
pub index: usize, pub index: usize,
pub values: &'a [T], pub values: &'a [T],