mirror of
https://github.com/ShadowJonathan/conduit_toolbox.git
synced 2025-06-07 18:07:08 +03:00
fix defaulting names
This commit is contained in:
parent
e20e99493e
commit
87d20a7857
2 changed files with 4 additions and 1 deletions
|
@ -62,7 +62,7 @@ impl Database for RocksDB {
|
|||
}
|
||||
|
||||
fn names<'a>(&'a self) -> Vec<Vec<u8>> {
|
||||
self.old_cfs.iter().map(|v| v.as_bytes().to_vec()).collect()
|
||||
self.old_cfs.iter().filter(|&v| &*v != "default").map(|v| v.as_bytes().to_vec()).collect()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,11 +15,14 @@ impl SledDB {
|
|||
}
|
||||
}
|
||||
|
||||
const SLED_DEFAULT: &[u8] = "__sled__default".as_bytes();
|
||||
|
||||
impl Database for SledDB {
|
||||
fn names<'a>(&'a self) -> Vec<Vec<u8>> {
|
||||
self.0
|
||||
.tree_names()
|
||||
.into_iter()
|
||||
.filter(|v| v != SLED_DEFAULT)
|
||||
.map(|v| v.to_vec())
|
||||
.collect_vec()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue