Format Rust code using rustfmt

This commit is contained in:
github-actions[bot] 2023-12-26 18:31:55 +00:00 committed by GitHub
parent a13f116698
commit 7eb32e55ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -449,7 +449,7 @@ async fn check_caps(
}
SqliteAction::Backup => {
// flushing WALs for backup
// check caps.
// check caps.
for db_ref in open_dbs.iter() {
let db = db_ref.value().lock().await;
db.execute("pragma wal_checkpoint", [])?;

View File

@ -222,15 +222,17 @@ async fn handle_request(
if Path::new(&checkpoint_dir).exists() {
fs::remove_dir_all(&checkpoint_dir).await?;
}
}
let checkpoint = Checkpoint::new(&db).map_err(|e| StateError::RocksDBError {
action: "BackupCheckpointNew".into(),
error: e.to_string(),
})?;
checkpoint.create_checkpoint(&checkpoint_dir).map_err(|e| StateError::RocksDBError {
action: "BackupCheckpointCreate".into(),
error: e.to_string(),
checkpoint.create_checkpoint(&checkpoint_dir).map_err(|e| {
StateError::RocksDBError {
action: "BackupCheckpointCreate".into(),
error: e.to_string(),
}
})?;
(serde_json::to_vec(&StateResponse::Backup).unwrap(), None)