chiark / gitweb /
clap: Rename hippotat crate's Opts type to CommonOpts
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Jun 2023 19:15:36 +0000 (20:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Jun 2023 20:15:29 +0000 (21:15 +0100)
commit36c76c3489e1dea700f0fd42bb9d61dbcb52365f
tree20427308c84a2fde73cca82f844bf616378282a7
parent3e8235469d4c58d4bb4ba2ed22431c192ac673f4
clap: Rename hippotat crate's Opts type to CommonOpts

clap 4 seems to index these by bare type name (!)
and panics if they aren't unique (!!)

    running 1 test
    test verify_cli ... FAILED

    failures:

    ---- verify_cli stdout ----
    thread 'verify_cli' panicked at 'Command hippotat: Argument group name must be unique

    'Opts' is already in use', /home/rustcargo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/builder/debug_asserts.rs:278:9
    stack backtrace:
       0: rust_begin_unwind
 at /rustc/071f14baae931e17a5a99366bf216e76384cc4f6/library/std/src/panicking.rs:578:5
       1: core::panicking::panic_fmt
 at /rustc/071f14baae931e17a5a99366bf216e76384cc4f6/library/core/src/panicking.rs:67:14
       2: clap_builder::builder::debug_asserts::assert_app
 at /home/rustcargo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/builder/debug_asserts.rs:278:9
       3: clap_builder::builder::command::Command::_build_self
 at /home/rustcargo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/builder/command.rs:3945:13
       4: clap_builder::builder::command::Command::_build_recursive
 at /home/rustcargo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/builder/command.rs:3843:9
       5: clap_builder::builder::command::Command::build
 at /home/rustcargo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/builder/command.rs:3838:9
       6: clap_builder::builder::command::Command::debug_assert
 at /home/rustcargo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/builder/command.rs:489:9
       7: hippotat::utils::verify_cli
 at ./src/utils.rs:236:3
       8: hippotat::verify_cli
 at ./client/client.rs:383:3
       9: hippotat::verify_cli::{{closure}}
 at ./client/client.rs:382:17
      10: core::ops::function::FnOnce::call_once
 at /rustc/071f14baae931e17a5a99366bf216e76384cc4f6/library/core/src/ops/function.rs:250:5
      11: core::ops::function::FnOnce::call_once
 at /rustc/071f14baae931e17a5a99366bf216e76384cc4f6/library/core/src/ops/function.rs:250:5
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

    failures:
verify_cli

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
client/client.rs
server/server.rs
src/config.rs