enable dead_code lint

This commit is contained in:
Charles Hall 2024-05-21 21:58:43 -07:00
parent 518d0c9cf3
commit d7e945f4c5
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
17 changed files with 15 additions and 137 deletions

View file

@ -1,6 +1,5 @@
use std::{future::Future, pin::Pin, sync::Arc};
use super::Config;
use crate::Result;
#[cfg(feature = "sqlite")]
@ -13,11 +12,11 @@ pub(crate) mod rocksdb;
pub(crate) mod watchers;
pub(crate) trait KeyValueDatabaseEngine: Send + Sync {
fn open(config: &Config) -> Result<Self>
#[cfg(any(feature = "sqlite", feature = "rocksdb"))]
fn open(config: &super::Config) -> Result<Self>
where
Self: Sized;
fn open_tree(&self, name: &'static str) -> Result<Arc<dyn KvTree>>;
fn flush(&self) -> Result<()>;
fn cleanup(&self) -> Result<()> {
Ok(())
}
@ -25,7 +24,6 @@ pub(crate) trait KeyValueDatabaseEngine: Send + Sync {
Ok("Current database engine does not support memory usage reporting."
.to_owned())
}
fn clear_caches(&self) {}
}
pub(crate) trait KvTree: Send + Sync {