Impl PartialEq for StoreId
This commit is contained in:
parent
0404b24333
commit
aa0f496474
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