diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 17:02:52 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 17:12:37 +0900 |
| commit | 84fe6ac6977f15cbec85cbc9f773567742a7fb87 (patch) | |
| tree | 5701e7c980585dd404471ab9fa53e98a0ba601ab /crates/shirabe-semver/src/version_parser.rs | |
| parent | 12a7756588a20f1351e6976f0c009de5992514a9 (diff) | |
| download | php-shirabe-84fe6ac6977f15cbec85cbc9f773567742a7fb87.tar.gz php-shirabe-84fe6ac6977f15cbec85cbc9f773567742a7fb87.tar.zst php-shirabe-84fe6ac6977f15cbec85cbc9f773567742a7fb87.zip | |
refactor(math): use method-style max/min/clamp over std::cmp
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-semver/src/version_parser.rs')
| -rw-r--r-- | crates/shirabe-semver/src/version_parser.rs | 2 |
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") |
