You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use clap::Clap;#[derive(clap::Clap)]structOpts{/// Verbose logging#[clap(long, takes_value = false)]verbose:bool,}fnmain(){println!("Value for verbose: {}", Opts::parse().verbose);}
Steps to reproduce the bug with the above code
cargo run -- --verbose=foobar
Actual Behaviour
$ cargo runValue for verbose: false
$ cargo run -- --verboseValue for verbose: true
$ cargo run -- --verbose=Value for verbose: true
$ cargo run -- --verbose=foobarValue for verbose: true
Expected Behaviour
$ cargo runValue for verbose: false
$ cargo run -- --verboseValue for verbose: true
$ cargo run -- --verbose=Error: option '--verbose' doesn't accept an argument
$ cargo run -- --verbose=foobarError: option '--verbose' doesn't accept an argument
Please complete the following tasks
Rust Version
rustc 1.51.0 (2fd73fabe 2021-03-23)
Clap Version
3.0.0-beta.2
Minimal reproducible code
Steps to reproduce the bug with the above code
Actual Behaviour
Expected Behaviour
Additional Context
No response
Debug Output
The text was updated successfully, but these errors were encountered: