Impl PartialEq for StoreId

This commit is contained in:
Matthias Beyer 2016-10-28 12:49:23 +02:00
parent 0404b24333
commit aa0f496474

View file

@ -33,12 +33,18 @@ use error::MapErrInto;
use store::Result;
/// The Index into the Store
#[derive(Debug, Clone, PartialEq, Hash, Eq, PartialOrd, Ord)]
#[derive(Debug, Clone, Hash, Eq, PartialOrd, Ord)]
pub struct StoreId {
base: Option<PathBuf>,
id: PathBuf,
}
impl PartialEq for StoreId {
fn eq(&self, other: &StoreId) -> bool {
self.id == other.id
}
}
impl StoreId {
pub fn new(base: Option<PathBuf>, id: PathBuf) -> Result<StoreId> {