aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-semver/src/version_parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-semver/src/version_parser.rs')
-rw-r--r--crates/shirabe-semver/src/version_parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe-semver/src/version_parser.rs b/crates/shirabe-semver/src/version_parser.rs
index 63abc00..ddde07e 100644
--- a/crates/shirabe-semver/src/version_parser.rs
+++ b/crates/shirabe-semver/src/version_parser.rs
@@ -446,7 +446,7 @@ impl VersionParser {
// For upper bound, we increment the position of one more significance,
// but highPosition = 0 would be illegal
- let high_position = std::cmp::max(1, position - 1);
+ let high_position = (position - 1).max(1);
let high_version = format!(
"{}-dev",
self.manipulate_version_string(&matches, high_position, 1, "0")