Skip to content

fix: panics in enable/disable/toggle - #138

Open
liskin wants to merge 2 commits into
JojiiOfficial:masterfrom
liskin:fix-clap-panics
Open

liskin wants to merge 2 commits into
JojiiOfficial:masterfrom
liskin:fix-clap-panics

Conversation

@liskin

@liskin liskin commented Apr 15, 2026

Copy link
Copy Markdown
  • fix: panic in enable/disable
    Fixes the following panic:

    $ RUST_BACKTRACE=1 cargo run -- enable anc
    […]
    thread 'main' (4124055) panicked at ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap_builder-4.5.53/src/parser/matches/arg_matches.rs:524:9:
    Mismatch between definition and access of `opt`. Unknown argument or group id.  Make sure you are using the argument id and not the short or long flags
    
    stack backtrace:
       […]
       4: earbuds::cmd::set_value::set
                 at /tmp/LiveBudsCli/src/cmd/set_value.rs:34:12
       5: earbuds::run_subcommands
                 at /tmp/LiveBudsCli/src/main.rs:119:9
       6: earbuds::main::main::{{closure}}
                 at /tmp/LiveBudsCli/src/main.rs:84:5
       7: earbuds::main::{{closure}}
                 at /tmp/LiveBudsCli/src/main.rs:19:1
    
  • fix: panic in toggle
    Fixes the following panic:

    $ RUST_BACKTRACE=1 cargo run -- toggle anc
    […]
    thread 'main' (4127873) panicked at src/main.rs:128:24:
    Mismatch between definition and access of `value`. Unknown argument or group id.  Make sure you are using the argument id and not the short or long flags
    
    stack backtrace:
       […]
       4: earbuds::run_subcommands
                 at ./src/main.rs:128:24
       5: earbuds::main::main::{{closure}}
                 at ./src/main.rs:84:5
       6: earbuds::main::{{closure}}
                 at ./src/main.rs:19:1
    

Related: #126 (comment)

liskin added 2 commits April 15, 2026 12:03
Fixes the following panic:

    $ RUST_BACKTRACE=1 cargo run -- enable anc
    […]
    thread 'main' (4124055) panicked at ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap_builder-4.5.53/src/parser/matches/arg_matches.rs:524:9:
    Mismatch between definition and access of `opt`. Unknown argument or group id.  Make sure you are using the argument id and not the short or long flags

    stack backtrace:
       […]
       4: earbuds::cmd::set_value::set
                 at /tmp/LiveBudsCli/src/cmd/set_value.rs:34:12
       5: earbuds::run_subcommands
                 at /tmp/LiveBudsCli/src/main.rs:119:9
       6: earbuds::main::main::{{closure}}
                 at /tmp/LiveBudsCli/src/main.rs:84:5
       7: earbuds::main::{{closure}}
                 at /tmp/LiveBudsCli/src/main.rs:19:1
Fixes the following panic:

    $ RUST_BACKTRACE=1 cargo run -- toggle anc
    […]
    thread 'main' (4127873) panicked at src/main.rs:128:24:
    Mismatch between definition and access of `value`. Unknown argument or group id.  Make sure you are using the argument id and not the short or long flags

    stack backtrace:
       […]
       4: earbuds::run_subcommands
                 at ./src/main.rs:128:24
       5: earbuds::main::main::{{closure}}
                 at ./src/main.rs:84:5
       6: earbuds::main::{{closure}}
                 at ./src/main.rs:19:1
@liskin liskin mentioned this pull request Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant