diff --git a/clap_generate/src/generators/shells/zsh.rs b/clap_generate/src/generators/shells/zsh.rs index db62ab08..c2f9fb45 100644 --- a/clap_generate/src/generators/shells/zsh.rs +++ b/clap_generate/src/generators/shells/zsh.rs @@ -396,6 +396,9 @@ fn value_completion(arg: &Arg) -> Option { ValueHint::Hostname => "_hosts", ValueHint::Url => "_urls", ValueHint::EmailAddress => "_email_addresses", + _ => { + return None; + } } .to_string(), ) diff --git a/src/build/app/settings.rs b/src/build/app/settings.rs index d9ae9fb1..f166795e 100644 --- a/src/build/app/settings.rs +++ b/src/build/app/settings.rs @@ -23,6 +23,7 @@ impl Default for AppFlags { /// /// [`App`]: crate::App #[derive(Debug, PartialEq, Copy, Clone)] +#[non_exhaustive] pub enum AppSettings { /// Try not to fail on parse errors, like missing option values. /// diff --git a/src/build/arg/settings.rs b/src/build/arg/settings.rs index f6d45859..d44ce378 100644 --- a/src/build/arg/settings.rs +++ b/src/build/arg/settings.rs @@ -25,6 +25,7 @@ impl Default for ArgFlags { /// [`Arg::unset_setting`]: crate::Arg::unset_setting() /// [`Arg::is_set`]: crate::Arg::is_set() #[derive(Debug, PartialEq, Copy, Clone)] +#[non_exhaustive] pub enum ArgSettings { /// Specifies that an arg must be used Required, diff --git a/src/build/arg/value_hint.rs b/src/build/arg/value_hint.rs index 5a3bf40d..45109d2d 100644 --- a/src/build/arg/value_hint.rs +++ b/src/build/arg/value_hint.rs @@ -25,6 +25,7 @@ use std::str::FromStr; /// [^1]: fish completions currently only support named arguments (e.g. -o or --opt), not /// positional arguments. #[derive(Debug, PartialEq, Copy, Clone)] +#[non_exhaustive] pub enum ValueHint { /// Default value if hint is not specified. Follows shell default behavior, which is usually /// auto-completing filenames. diff --git a/src/parse/errors.rs b/src/parse/errors.rs index e5b607be..e2e3c0b4 100644 --- a/src/parse/errors.rs +++ b/src/parse/errors.rs @@ -24,6 +24,7 @@ pub type Result = StdResult; /// Command line argument parser kind of error #[derive(Debug, Copy, Clone, PartialEq)] +#[non_exhaustive] pub enum ErrorKind { /// Occurs when an [`Arg`] has a set of possible values, /// and the user provides a value which isn't in that set.