refactor account with clap derive api

This commit is contained in:
Clément DOUIN
2023-12-06 18:09:49 +01:00
parent d2308221d7
commit abe4c7f4ea
21 changed files with 1056 additions and 1029 deletions
-13
View File
@@ -121,11 +121,6 @@ pub fn all_arg(help: &'static str) -> Arg {
.conflicts_with(ARG_EXCLUDE)
}
/// Represents the all folders argument parser.
pub fn parse_all_arg(m: &ArgMatches) -> bool {
m.get_flag(ARG_ALL)
}
/// Represents the folders to include argument.
pub fn include_arg(help: &'static str) -> Arg {
Arg::new(ARG_INCLUDE)
@@ -141,14 +136,6 @@ pub fn include_arg(help: &'static str) -> Arg {
.conflicts_with(ARG_EXCLUDE)
}
/// Represents the folders to include argument parser.
pub fn parse_include_arg(m: &ArgMatches) -> HashSet<String> {
m.get_many::<String>(ARG_INCLUDE)
.unwrap_or_default()
.map(ToOwned::to_owned)
.collect()
}
/// Represents the folders to exclude argument.
pub fn exclude_arg(help: &'static str) -> Arg {
Arg::new(ARG_EXCLUDE)