diff --git a/pkgs/id/src/cli.rs b/pkgs/id/src/cli.rs index c897da74e5..eec03ce50a 100644 --- a/pkgs/id/src/cli.rs +++ b/pkgs/id/src/cli.rs @@ -196,7 +196,6 @@ pub struct Cli { /// Each variant represents a distinct operation mode for the `id` tool. /// Commands are organized by their primary function: storage, retrieval, /// search, or system operations. -#[derive(Subcommand, Debug)] /// Parses a result limit (`--first` / `--last` / peek `--lines`): zero is /// rejected with a clear error instead of silently producing an empty result /// or a header-only preview (#3059). Clap names the flag in its error prefix, @@ -209,6 +208,7 @@ fn parse_result_limit(raw: &str) -> Result { } } +#[derive(Subcommand, Debug)] pub enum Command { /// Start a server that accepts put/get requests from peers. /// diff --git a/pkgs/id/src/repl/runner.rs b/pkgs/id/src/repl/runner.rs index 7efc7a0297..9160f36898 100644 --- a/pkgs/id/src/repl/runner.rs +++ b/pkgs/id/src/repl/runner.rs @@ -1643,12 +1643,12 @@ mod tests { #[test] fn test_parse_find_args_invalid_format_is_error() { let rest = ["--format", "gorup", "hello"]; - let args = parse_find_args(&rest, "union"); + let args = parse_find_args(&rest, "union").unwrap(); assert_eq!(args.format_error, Some("gorup")); assert_eq!(args.format, "union"); let rest = ["--format", "yaml", "hello"]; - let args = parse_find_args(&rest, "tag"); + let args = parse_find_args(&rest, "tag").unwrap(); assert_eq!(args.format_error, Some("yaml")); } @@ -1656,7 +1656,7 @@ mod tests { fn test_parse_find_args_valid_format_is_stored() { for good in ["tag", "group", "union"] { let rest = ["--format", good, "hello"]; - let args = parse_find_args(&rest, "union"); + let args = parse_find_args(&rest, "union").unwrap(); assert_eq!(args.format_error, None); assert_eq!(args.format, good); }