style: fix clippy collapsible_if warnings in nvim-core
This commit is contained in:
1 parent
148025c5a7
commit
b2f15de58c
8 files changed
+105
-89
No files matched your search
+3
-6
@@ -1,7 +1,7 @@
|
||||
use crate::store::STORE_TABLE;
|
||||
use redb::{Database, ReadableTable};
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use redb::{Database, ReadableTable};
|
||||
use crate::store::STORE_TABLE;
|
||||
|
||||
pub fn init_redb(base: &Path) -> Arc<Database> {
|
||||
let redb_path = base.join("mcp_store.redb");
|
||||
@@ -50,10 +50,7 @@ pub fn init_redb(base: &Path) -> Arc<Database> {
|
||||
table
|
||||
.insert(*key, data.as_slice())
|
||||
.expect("Failed to insert migrated data");
|
||||
let _ = std::fs::rename(
|
||||
&json_path,
|
||||
json_path.with_extension("json.migrated"),
|
||||
);
|
||||
let _ = std::fs::rename(&json_path, json_path.with_extension("json.migrated"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user