diff --git a/libimagentrytag/src/ui.rs b/libimagentrytag/src/ui.rs index f2b61d75..29cf8bc8 100644 --- a/libimagentrytag/src/ui.rs +++ b/libimagentrytag/src/ui.rs @@ -75,13 +75,9 @@ pub fn get_add_tags(matches: &ArgMatches) -> Option> { /// /// Returns none if the argument was not specified pub fn get_remove_tags(matches: &ArgMatches) -> Option> { - if let Some(v) = extract_tags(matches, tag_subcommand_remove_arg_name(), '-') { - return Some(v); - } else { - matches - .values_of(tag_subcommand_remove_arg_name()) - .map(|values| values.map(String::from).collect()) - } + let rem = tag_subcommand_remove_arg_name(); + extract_tags(matches, rem, '+') + .or_else(|| matches.values_of(rem).map(|values| values.map(String::from).collect())) } fn extract_tags(matches: &ArgMatches, specifier: &str, specchar: char) -> Option> {