diff options
Diffstat (limited to 'import/src/db.rs')
-rw-r--r-- | import/src/db.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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<HashMap<String, Vec<(Vec<usize>, Node)>>>; pub(crate) struct MemoryStorage<'a> { pub db: &'a DataAcid, - pub parts: RwLock<HashMap<String, Vec<(Vec<usize>, 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<()> { |