From 2b1ea87f3e20825ca10ab4a4bea83e1a30bb7800 Mon Sep 17 00:00:00 2001 From: jedarden Date: Sat, 18 Apr 2026 22:06:56 -0400 Subject: [PATCH] P0.7: Fix cargo fmt and clippy warnings for CI smoke cargo fmt reformats dump.rs match arms; credentials.rs needs #[allow(dead_code)] on an unused public helper. Co-Authored-By: Claude Opus 4.7 --- crates/miroir-ctl/src/commands/dump.rs | 31 +++++++++++++------------- crates/miroir-ctl/src/credentials.rs | 1 + 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/crates/miroir-ctl/src/commands/dump.rs b/crates/miroir-ctl/src/commands/dump.rs index 478e5b5..343a658 100644 --- a/crates/miroir-ctl/src/commands/dump.rs +++ b/crates/miroir-ctl/src/commands/dump.rs @@ -63,28 +63,27 @@ pub enum DumpSubcommand { pub async fn run(cmd: DumpSubcommand) -> Result<(), Box> { match cmd { - DumpSubcommand::Import { file, index, mode, .. } => { - Err(format!( - "Dump import is not yet implemented. See bead miroir-zc2.5 for tracking.\n\n\ + DumpSubcommand::Import { + file, index, mode, .. + } => Err(format!( + "Dump import is not yet implemented. See bead miroir-zc2.5 for tracking.\n\n\ For dump compatibility information, see:\n\ docs/dump-import/compatibility-matrix.md\n\n\ Requested:\n\ File: {file}\n\ - Index: {index}\n\ + Index: {index:?}\n\ Mode: {mode}" - ).into()) - } - DumpSubcommand::Export { output, index, .. } => { - Err(format!( - "Dump export is not yet implemented. See bead miroir-qon for tracking.\n\n\ + ) + .into()), + DumpSubcommand::Export { output, index, .. } => Err(format!( + "Dump export is not yet implemented. See bead miroir-qon for tracking.\n\n\ Requested:\n\ Output: {output}\n\ Index: {index:?}" - ).into()) - } - DumpSubcommand::Analyze { file } => { - Err(format!( - "Dump analysis is not yet implemented. See bead miroir-zc2.5 for tracking.\n\n\ + ) + .into()), + DumpSubcommand::Analyze { file } => Err(format!( + "Dump analysis is not yet implemented. See bead miroir-zc2.5 for tracking.\n\n\ This command will analyze {file} and report:\n\ - Whether streaming mode can reconstruct the dump\n\ - Any field conflicts (e.g., existing `_miroir_shard`)\n\ @@ -92,7 +91,7 @@ pub async fn run(cmd: DumpSubcommand) -> Result<(), Box> - Recommended import mode\n\n\ See compatibility matrix:\n\ docs/dump-import/compatibility-matrix.md" - ).into()) - } + ) + .into()), } } diff --git a/crates/miroir-ctl/src/credentials.rs b/crates/miroir-ctl/src/credentials.rs index c236326..0cd50ad 100644 --- a/crates/miroir-ctl/src/credentials.rs +++ b/crates/miroir-ctl/src/credentials.rs @@ -113,6 +113,7 @@ fn load_from_credentials_file() -> Result, CredentialError> { } /// Get the credentials file path for diagnostic messages +#[allow(dead_code)] pub fn credentials_file_path() -> Option { let config_dir = dirs::config_dir()?; let miroir_config_dir = config_dir.join("miroir");