diff options
author | Katharina Fey <kookie@spacekookie.de> | 2018-06-12 00:41:19 +0200 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2018-06-12 00:41:19 +0200 |
commit | df6f9365f80b836b18548b4a33b50a4abe94ff38 (patch) | |
tree | 3d7ec7ef4583b4085a396e70105d8d52c451a388 /lockchain-core/src/meta.rs | |
parent | 5a5d1606d481eb1a78d5dc4ce9626d26cf6f9e4a (diff) |
Fixing an issue in the metadomain insert function and fixing some file sync issues
Diffstat (limited to '')
-rw-r--r-- | lockchain-core/src/meta.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lockchain-core/src/meta.rs b/lockchain-core/src/meta.rs index fa7fa81..8973b7d 100644 --- a/lockchain-core/src/meta.rs +++ b/lockchain-core/src/meta.rs @@ -25,7 +25,7 @@ use traits::{AutoEncoder, Body}; /// /// It implements a series of traits which means it's possible to easily /// interact with to store data. -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] pub struct MetaDomain { /// The name of this meta domain name: String, @@ -63,7 +63,9 @@ impl Body for MetaDomain { } fn set_field(&mut self, key: &str, value: Payload) -> Option<()> { - self.body.insert(key.into(), value).map(|_| ()) + self.body + .insert(key.into(), value) + .map_or(Some(()), |_| Some(())) } /// Not implemented, always returns None |