diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
| commit | a1c7e6908a26e10f6e1f23a51721664b5e2d838d (patch) | |
| tree | c575c76f1b43359ed74913da4c6a2636643f1ba0 /crates/shirabe-semver/src/constraint/constraint.rs | |
| parent | 7f606f36fef0c0467c3c0db3d0da33af486dae8a (diff) | |
| download | php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.gz php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.zst php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.zip | |
chore(style): cargo fmt
Diffstat (limited to 'crates/shirabe-semver/src/constraint/constraint.rs')
| -rw-r--r-- | crates/shirabe-semver/src/constraint/constraint.rs | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/crates/shirabe-semver/src/constraint/constraint.rs b/crates/shirabe-semver/src/constraint/constraint.rs index e35b3e4..b0c937c 100644 --- a/crates/shirabe-semver/src/constraint/constraint.rs +++ b/crates/shirabe-semver/src/constraint/constraint.rs @@ -131,26 +131,17 @@ impl Constraint { if self.version.starts_with("dev-") { if Self::OP_EQ == self.operator { if Self::OP_EQ == other_operator { - return format!( - "$b && $v === {}", - php::var_export_str(&self.version, true) - ); + return format!("$b && $v === {}", php::var_export_str(&self.version, true)); } if Self::OP_NE == other_operator { - return format!( - "!$b || $v !== {}", - php::var_export_str(&self.version, true) - ); + return format!("!$b || $v !== {}", php::var_export_str(&self.version, true)); } return "false".to_string(); } if Self::OP_NE == self.operator { if Self::OP_EQ == other_operator { - return format!( - "!$b || $v !== {}", - php::var_export_str(&self.version, true) - ); + return format!("!$b || $v !== {}", php::var_export_str(&self.version, true)); } if Self::OP_NE == other_operator { return "true".to_string(); @@ -276,7 +267,12 @@ impl Constraint { }; if self - .version_compare(version1, version2, Self::trans_op_int(operator), compare_branches) + .version_compare( + version1, + version2, + Self::trans_op_int(operator), + compare_branches, + ) .expect("valid operator") { return !(Self::trans_op_int(provider.operator) == provider_no_equal_op |
