build: replace version-compare crate with semver

closes #399
This commit is contained in:
Christian Visintin
2026-04-19 01:54:46 +05:30
parent 0ba43d5714
commit bd0843d3da
3 changed files with 9 additions and 10 deletions
+7 -2
View File
@@ -132,8 +132,13 @@ impl Update {
/// Check wether new version is higher than new version
fn is_new_version_higher(new_version: &str, current_version: &str) -> bool {
version_compare::compare(new_version, current_version).unwrap_or(version_compare::Cmp::Lt)
== version_compare::Cmp::Gt
match (
semver::Version::parse(new_version),
semver::Version::parse(current_version),
) {
(Ok(new), Ok(current)) => new > current,
_ => false,
}
}
}
impl From<Status> for UpdateStatus {