diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-22 19:13:00 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-22 19:13:00 +0900 |
| commit | f6dd6914d4ba4b1b5fae1f29992fd1a2b4cd96f5 (patch) | |
| tree | 31eab6fe7b229ed5865807879a7e186a8d2b91d9 /crates/mozart-core/src/version_bumper.rs | |
| parent | 8b8d60509669606df0dacea47c3551f49125b459 (diff) | |
| download | php-mozart-f6dd6914d4ba4b1b5fae1f29992fd1a2b4cd96f5.tar.gz php-mozart-f6dd6914d4ba4b1b5fae1f29992fd1a2b4cd96f5.tar.zst php-mozart-f6dd6914d4ba4b1b5fae1f29992fd1a2b4cd96f5.zip | |
chore: cargo fmt
Diffstat (limited to 'crates/mozart-core/src/version_bumper.rs')
| -rw-r--r-- | crates/mozart-core/src/version_bumper.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/mozart-core/src/version_bumper.rs b/crates/mozart-core/src/version_bumper.rs index 3bc672f..5d6e75e 100644 --- a/crates/mozart-core/src/version_bumper.rs +++ b/crates/mozart-core/src/version_bumper.rs @@ -401,8 +401,12 @@ fn split_and_parts(constraint: &str) -> (Vec<&str>, &str) { } // If what follows starts with an operator, split here if i < bytes.len() - && (bytes[i] == b'>' || bytes[i] == b'<' || bytes[i] == b'!' - || bytes[i] == b'=' || bytes[i] == b'^' || bytes[i] == b'~') + && (bytes[i] == b'>' + || bytes[i] == b'<' + || bytes[i] == b'!' + || bytes[i] == b'=' + || bytes[i] == b'^' + || bytes[i] == b'~') { parts.push(&constraint[current_start..space_start]); current_start = i; @@ -418,9 +422,7 @@ fn split_and_parts(constraint: &str) -> (Vec<&str>, &str) { /// Check if a constraint part is a lower bound (can be bumped). fn is_lower_bound(part: &str) -> bool { - part.starts_with(">=") - || part.starts_with('^') - || part.starts_with('~') + part.starts_with(">=") || part.starts_with('^') || part.starts_with('~') } // ─── Helpers ────────────────────────────────────────────────────────────────── |
