fix some more pedantic clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
a7e6fe8b60
commit
7bd56765ef
22 changed files with 136 additions and 126 deletions
|
@ -174,7 +174,7 @@ impl KeyValueDatabaseEngine for Arc<Engine> {
|
|||
if !self.old_cfs.contains(&name.to_owned()) {
|
||||
// Create if it didn't exist
|
||||
debug!("Creating new column family in database: {}", name);
|
||||
let _ = self.rocks.create_cf(name, &self.opts);
|
||||
_ = self.rocks.create_cf(name, &self.opts);
|
||||
}
|
||||
|
||||
Ok(Arc::new(RocksDbEngineTree {
|
||||
|
@ -253,8 +253,8 @@ impl KeyValueDatabaseEngine for Arc<Engine> {
|
|||
match engine.create_new_backup_flush(&self.rocks, true) {
|
||||
Err(e) => return Err(Box::new(e)),
|
||||
Ok(()) => {
|
||||
let _info = engine.get_backup_info();
|
||||
let info = &_info.last().unwrap();
|
||||
let engine_info = engine.get_backup_info();
|
||||
let info = &engine_info.last().unwrap();
|
||||
info!(
|
||||
"Created database backup #{} using {} bytes in {} files",
|
||||
info.backup_id, info.size, info.num_files,
|
||||
|
|
|
@ -38,7 +38,7 @@ impl<T> Drop for NonAliasingBox<T> {
|
|||
// this was done.
|
||||
#[allow(clippy::undocumented_unsafe_blocks)]
|
||||
unsafe {
|
||||
let _ = Box::from_raw(self.0);
|
||||
_ = Box::from_raw(self.0);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ impl Watchers {
|
|||
let mut watchers = self.watchers.write().unwrap();
|
||||
for prefix in triggered {
|
||||
if let Some(tx) = watchers.remove(prefix) {
|
||||
let _ = tx.0.send(());
|
||||
_ = tx.0.send(());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -237,6 +237,7 @@ impl KeyValueDatabase {
|
|||
}
|
||||
|
||||
/// Load an existing database or create a new one.
|
||||
#[allow(clippy::too_many_lines)]
|
||||
pub async fn load_or_create(config: Config) -> Result<()> {
|
||||
Self::check_db_setup(&config)?;
|
||||
|
||||
|
@ -397,7 +398,7 @@ impl KeyValueDatabase {
|
|||
|
||||
let db = Box::leak(db_raw);
|
||||
|
||||
let services_raw = Box::new(Services::build(db, config)?);
|
||||
let services_raw = Box::new(Services::build(db, &config)?);
|
||||
|
||||
// This is the first and only time we initialize the SERVICE static
|
||||
*SERVICES.write().unwrap() = Some(Box::leak(services_raw));
|
||||
|
@ -1040,7 +1041,7 @@ impl KeyValueDatabase {
|
|||
},
|
||||
}
|
||||
|
||||
let _ = Self::try_handle_updates().await;
|
||||
_ = Self::try_handle_updates().await;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue