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:
@@ -196,7 +196,7 @@ fn main() -> Result<()> {
|
||||
} => cmd_reconstitute(&cli, snapshot_id, target)?,
|
||||
Commands::Decay { preset } => cmd_decay(&cli, &preset)?,
|
||||
Commands::Gc => {
|
||||
Vault::open(&vault_path(&cli.data_dir), require_passphrase(&cli)?)?.collect_garbage()?
|
||||
Vault::open(vault_path(&cli.data_dir), require_passphrase(&cli)?)?.collect_garbage()?
|
||||
}
|
||||
Commands::Wormhole { ref cmd } => match cmd {
|
||||
WormholeCmd::Pair { code, name } => wormhole_pair(&cli, code, name)?,
|
||||
@@ -326,7 +326,7 @@ fn cmd_snap(cli: &Cli, orbit_name: Option<String>) -> Result<()> {
|
||||
}
|
||||
|
||||
fn cmd_list(cli: &Cli) -> Result<()> {
|
||||
let vault = Vault::open(&vault_path(&cli.data_dir), require_passphrase(cli)?)?;
|
||||
let vault = Vault::open(vault_path(&cli.data_dir), require_passphrase(cli)?)?;
|
||||
for s in vault.list_snapshots()? {
|
||||
let stored = s
|
||||
.stored_bytes
|
||||
@@ -345,14 +345,14 @@ fn cmd_list(cli: &Cli) -> Result<()> {
|
||||
}
|
||||
|
||||
fn cmd_reconstitute(cli: &Cli, snapshot_id: Uuid, target: String) -> Result<()> {
|
||||
let vault = Vault::open(&vault_path(&cli.data_dir), require_passphrase(cli)?)?;
|
||||
let vault = Vault::open(vault_path(&cli.data_dir), require_passphrase(cli)?)?;
|
||||
let n = vault.restore_snapshot(snapshot_id, std::path::Path::new(&target))?;
|
||||
println!("Reconstituted {n} bytes to {target}");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn cmd_decay(cli: &Cli, preset: &str) -> Result<()> {
|
||||
let mut vault = Vault::open(&vault_path(&cli.data_dir), require_passphrase(cli)?)?;
|
||||
let mut vault = Vault::open(vault_path(&cli.data_dir), require_passphrase(cli)?)?;
|
||||
let pruned = vault.prune_with_decay(preset)?;
|
||||
println!("{} snapshots decayed.", pruned.len());
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user