chore: rustfmt the workspace and make clippy -D warnings pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 19:19:21 +07:00
parent d7fe99edd7
commit f13f0e6953
46 changed files with 6606 additions and 1496 deletions

View File

@@ -30,12 +30,15 @@ pub struct CaptureResult {
pub restore_hints: Value,
}
pub fn provider_from_config(kind: &ProviderKind, config: &Value) -> Result<Box<dyn BackupProvider>> {
pub fn provider_from_config(
kind: &ProviderKind,
config: &Value,
) -> Result<Box<dyn BackupProvider>> {
match kind {
ProviderKind::Filesystem => Ok(Box::new(FilesystemProvider::from_config(config)?)),
ProviderKind::Postgres => Ok(Box::new(PostgresProvider::from_config(config)?)),
ProviderKind::Command => anyhow::bail!(
"command provider is outside this release; use filesystem or postgres"
),
ProviderKind::Command => {
anyhow::bail!("command provider is outside this release; use filesystem or postgres")
}
}
}

View File

@@ -72,7 +72,12 @@ impl PostgresSource {
self.dump_archive(file, "custom", true).await
}
async fn dump_archive(&self, file: fs::File, format: &str, preserve_permissions: bool) -> Result<()> {
async fn dump_archive(
&self,
file: fs::File,
format: &str,
preserve_permissions: bool,
) -> Result<()> {
let mut args = dump_args(format)?;
if !preserve_permissions {
args.extend(["--no-owner".into(), "--no-acl".into()]);