diff --git a/libimagentrytag/src/ui.rs b/libimagentrytag/src/ui.rs index 70b9337e..f2b61d75 100644 --- a/libimagentrytag/src/ui.rs +++ b/libimagentrytag/src/ui.rs @@ -66,13 +66,9 @@ pub fn tag_argument_name() -> &'static str { /// /// Returns none if the argument was not specified pub fn get_add_tags(matches: &ArgMatches) -> Option> { - if let Some(v) = extract_tags(matches, tag_subcommand_add_arg_name(), '+') { - return Some(v); - } else { - matches - .values_of(tag_subcommand_add_arg_name()) - .map(|values| values.map(String::from).collect()) - } + let add = tag_subcommand_add_arg_name(); + extract_tags(matches, add, '+') + .or_else(|| matches.values_of(add).map(|values| values.map(String::from).collect())) } /// Get the tags which should be removed from the commandline