diff --git a/src/lib.rs b/src/lib.rs index 623262d..afcb82a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,6 +82,7 @@ pub struct Verbosity { help = L::quiet_help(), long_help = L::quiet_long_help(), conflicts_with = "verbose", + hide(L::default().is_none()) )] quiet: u8, @@ -210,6 +211,18 @@ impl LogLevel for InfoLevel { } } +/// Default to [`None`] +/// +/// Will disable the `--quiet` / `-q` flag. +#[derive(Copy, Clone, Debug, Default)] +pub struct OffLevel; + +impl LogLevel for OffLevel { + fn default() -> Option { + None + } +} + #[cfg(test)] mod test { use super::*;