mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-29 11:18:30 +00:00
resolve the last few relevant pedantic clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
fa71dd4b4c
commit
48d1a3af3c
20 changed files with 464 additions and 560 deletions
|
@ -253,18 +253,17 @@ impl KeyValueDatabaseEngine for Arc<Engine> {
|
|||
let options = BackupEngineOptions::new(path.unwrap())?;
|
||||
let mut engine = BackupEngine::open(&options, &self.env)?;
|
||||
let ret = if self.config.database_backups_to_keep > 0 {
|
||||
match engine.create_new_backup_flush(&self.rocks, true) {
|
||||
Err(e) => return Err(Box::new(e)),
|
||||
Ok(()) => {
|
||||
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,
|
||||
);
|
||||
Ok(())
|
||||
},
|
||||
if let Err(e) = engine.create_new_backup_flush(&self.rocks, true) {
|
||||
return Err(Box::new(e));
|
||||
}
|
||||
|
||||
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,
|
||||
);
|
||||
Ok(())
|
||||
} else {
|
||||
Ok(())
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue