aboutsummaryrefslogtreecommitdiff
path: root/database/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'database/src/lib.rs')
-rw-r--r--database/src/lib.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/database/src/lib.rs b/database/src/lib.rs
index 62bc585..0e89873 100644
--- a/database/src/lib.rs
+++ b/database/src/lib.rs
@@ -170,11 +170,7 @@ impl Database {
}
}
- pub fn update_node_init(
- &self,
- id: NodeID,
- update: impl FnOnce(&mut Node) -> Result<()>,
- ) -> Result<()> {
+ pub fn update_node_init(&self, id: NodeID, update: impl FnOnce(&mut Node)) -> Result<()> {
let time = SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.unwrap()
@@ -188,7 +184,7 @@ impl Database {
let mut node = t_node.get(id.0)?.map(|v| v.value().0).unwrap_or_default();
let dh_before = serde_json::to_vec(&node).unwrap();
- update(&mut node)?;
+ update(&mut node);
let dh_after = serde_json::to_vec(&node).unwrap();
if dh_before == dh_after {