Skip to content

Commit 69a9572

Browse files
committed
fix: code
1 parent 2c897cf commit 69a9572

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/database.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,15 +387,14 @@ impl DataBase {
387387
}
388388

389389
pub async fn meta_data(&self, key: &str) -> Option<DataNode> {
390-
let res = self.file.read(key.to_string(), &self.index).await;
391-
res
390+
self.file.read(key.to_string(), &self.index).await
392391
}
393392

394393
pub async fn delete(&mut self, key: &str) -> Result<()> {
395394
TOTAL_INFO.lock().await.index_reduce(1);
396395
return match self.set(key, DataValue::None, 0).await {
397396
Ok(_) => {
398-
self.index.remove(&key.to_string());
397+
self.index.remove(key);
399398
Ok(())
400399
}
401400
Err(e) => Err(e),

0 commit comments

Comments
 (0)