summaryrefslogtreecommitdiff
path: root/libimagstore/src/store.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libimagstore/src/store.rs')
-rw-r--r--libimagstore/src/store.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs
index e07c9b2..eca2ea0 100644
--- a/libimagstore/src/store.rs
+++ b/libimagstore/src/store.rs
@@ -963,7 +963,7 @@ pub type EntryContent = String;
///
/// This is basically a wrapper around `toml::Table` which provides convenience to the user of the
/// library.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, PartialEq)]
pub struct EntryHeader {
header: Value,
}
@@ -1558,6 +1558,16 @@ impl Entry {
}
+impl PartialEq for Entry {
+
+ fn eq(&self, other: &Entry) -> bool {
+ self.location == other.location && // As the location only compares from the store root
+ self.header == other.header && // and the other Entry could be from another store (not
+ self.content == other.content // implemented by now, but we think ahead here)
+ }
+
+}
+
mod glob_store_iter {
use std::fmt::{Debug, Formatter};
use std::fmt::Error as FmtError;