From aa0f496474ab89a58c9ca94667977c12f2267d58 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 28 Oct 2016 12:49:23 +0200 Subject: [PATCH] Impl PartialEq for StoreId --- libimagstore/src/storeid.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libimagstore/src/storeid.rs b/libimagstore/src/storeid.rs index 8a3623c8..72e75d3e 100644 --- a/libimagstore/src/storeid.rs +++ b/libimagstore/src/storeid.rs @@ -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, id: PathBuf, } +impl PartialEq for StoreId { + fn eq(&self, other: &StoreId) -> bool { + self.id == other.id + } +} + impl StoreId { pub fn new(base: Option, id: PathBuf) -> Result {