From 05d11426a8e60fa060733eb8ae7843bc2ae9725c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 10 Jun 2024 15:28:36 +0200 Subject: apply many clippy issue --- import/src/db.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'import/src/db.rs') diff --git a/import/src/db.rs b/import/src/db.rs index 87350ac..7a3636c 100644 --- a/import/src/db.rs +++ b/import/src/db.rs @@ -62,7 +62,7 @@ impl ImportStorage for DatabaseStorage<'_> { Ok(value.value().0) } fn insert_complete_node(&self, id: &str, node: Node) -> anyhow::Result<()> { - insert_complete_node(&self.db, id, node) + insert_complete_node(self.db, id, node) } fn add_partial_node(&self, id: &str, index_path: &[usize], node: Node) -> anyhow::Result<()> { @@ -106,9 +106,10 @@ impl ImportStorage for DatabaseStorage<'_> { } } +pub type Parts = RwLock, Node)>>>; pub(crate) struct MemoryStorage<'a> { pub db: &'a DataAcid, - pub parts: RwLock, Node)>>>, + pub parts: Parts, } impl<'a> MemoryStorage<'a> { pub fn new(db: &'a DataAcid) -> Self { @@ -148,7 +149,7 @@ impl ImportStorage for MemoryStorage<'_> { .to_owned()) } fn insert_complete_node(&self, id: &str, node: Node) -> anyhow::Result<()> { - insert_complete_node(&self.db, id, node) + insert_complete_node(self.db, id, node) } fn add_partial_node(&self, id: &str, index_path: &[usize], node: Node) -> anyhow::Result<()> { -- cgit v1.2.3-70-g09d2