diff --git a/examples/default_level.rs b/examples/default_level.rs new file mode 100644 index 0000000..0016021 --- /dev/null +++ b/examples/default_level.rs @@ -0,0 +1,24 @@ +use clap::Parser; +use clap_verbosity_flag::{InfoLevel, Verbosity}; + +#[derive(Debug, Parser)] +struct DefaultCli { + #[command(flatten)] + verbose: Verbosity, +} + +#[derive(Debug, Parser)] +struct InfoCli { + #[command(flatten)] + verbose: Verbosity, +} + +fn main() { + let error_cli = DefaultCli::parse(); + + dbg!(&error_cli.verbose); + + let info_cli = InfoCli::parse(); + + dbg!(&info_cli.verbose); +}