Fix verbosity serialization (#853)

Forgot the serde defaults which lead to problems on some terminals
This commit is contained in:
Matthias 2022-11-29 12:59:32 +01:00 committed by GitHub
parent 93a1481305
commit e476965bee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,7 @@ default_function! {
timeout: usize = DEFAULT_TIMEOUT_SECS;
retry_wait_time: usize = DEFAULT_RETRY_WAIT_TIME_SECS;
method: String = DEFAULT_METHOD.to_string();
verbosity: Verbosity<WarnLevel> = Verbosity::new(1, 0);
}
// Macro for merging configuration values
@ -142,6 +143,7 @@ impl LycheeOptions {
pub(crate) struct Config {
/// Verbose program output
#[clap(flatten)]
#[serde(default = "verbosity")]
pub(crate) verbose: Verbosity<WarnLevel>,
/// Do not show progress bar.
@ -363,7 +365,7 @@ impl Config {
self, toml;
// Keys with defaults to assign
verbose: Verbosity::new(0, 0);
verbose: Verbosity::new(1, 0);
cache: false;
no_progress: false;
max_redirects: DEFAULT_MAX_REDIRECTS;