diff --git a/release-helper/src/lib.rs b/release-helper/src/lib.rs index b9b0df95..2408c110 100644 --- a/release-helper/src/lib.rs +++ b/release-helper/src/lib.rs @@ -86,17 +86,7 @@ pub fn today_iso8601() -> String { } pub fn enabled_version_flag_count(major: bool, minor: bool, patch: bool) -> i32 { - let mut count = 0; - if major { - count += 1; - } - if minor { - count += 1; - } - if patch { - count += 1; - } - count + [major, minor, patch].into_iter().filter(|b| *b).count() as i32 } pub fn get_version_level(major: bool, minor: bool, patch: bool) -> Result {