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:
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()]);
|
||||
|
||||
Reference in New Issue
Block a user