From 6468d287c3fc576fff3ec6ba0b88bb2a7d8b13ba Mon Sep 17 00:00:00 2001 From: Ziyang Hu Date: Tue, 2 May 2023 23:15:58 +0800 Subject: [PATCH] fix storage --- cozo-core/src/storage/sled.rs | 4 ++-- cozo-core/src/storage/tikv.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cozo-core/src/storage/sled.rs b/cozo-core/src/storage/sled.rs index 756bfcff..1811fdf4 100644 --- a/cozo-core/src/storage/sled.rs +++ b/cozo-core/src/storage/sled.rs @@ -7,9 +7,9 @@ */ use std::cmp::Ordering; +use std::iter; use std::iter::Fuse; use std::path::Path; -use std::{iter, thread}; use itertools::Itertools; use miette::{miette, IntoDiagnostic, Result}; @@ -150,7 +150,7 @@ impl<'s> StoreTx<'s> for SledTx { } for k_res in to_del.into_iter() { - self.db.remove(&k_res)?; + self.db.remove(&k_res).into_diagnostic()?; } Ok(()) } diff --git a/cozo-core/src/storage/tikv.rs b/cozo-core/src/storage/tikv.rs index a47e24b3..53ee207c 100644 --- a/cozo-core/src/storage/tikv.rs +++ b/cozo-core/src/storage/tikv.rs @@ -6,9 +6,9 @@ * You can obtain one at https://mozilla.org/MPL/2.0/. */ +use std::iter; use std::ops::Bound::{Excluded, Included}; use std::sync::{Arc, Mutex}; -use std::{iter, thread}; use itertools::Itertools; use lazy_static::lazy_static;