Merge pull request #827 from matthiasbeyer/libimagstore/store-id-cmp-without-base
Impl PartialEq for StoreId
This commit is contained in:
commit
fa64c2d27d
1 changed files with 7 additions and 1 deletions
|
@ -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> {
|
||||
|
|
Loading…
Reference in a new issue