Merge pull request #827 from matthiasbeyer/libimagstore/store-id-cmp-without-base

Impl PartialEq for StoreId
This commit is contained in:
Matthias Beyer 2016-10-31 23:31:03 +01:00 committed by GitHub
commit fa64c2d27d

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> {