style: 运行 cargo fmt 修正格式(备份命令/更新比较/事件与设置文件的换行与缩进)
Sync source to CNB / Sync Git ref (push) Has been cancelled

This commit is contained in:
AxTps committed 2026-10-03 10:18:53 +08:00
1 parent b633f7cdf0
commit fe61337a34
5 files changed
+21 -22

No files matched your search

+9 -8
View File
@@ -34,8 +34,11 @@ const UPDATE_DOWNLOAD_TIMEOUT: std::time::Duration =
fn is_remote_newer(current: &Version, remote: &Version) -> bool {
use std::cmp::Ordering;
let core = (remote.major, remote.minor, remote.patch)
.cmp(&(current.major, current.minor, current.patch));
let core = (remote.major, remote.minor, remote.patch).cmp(&(
current.major,
current.minor,
current.patch,
));
if core != Ordering::Equal {
return core == Ordering::Greater;
}
@@ -79,12 +82,10 @@ fn compare_prerelease(left: &str, right: &str) -> std::cmp::Ordering {
let (r_prefix, r_num) = split_prerelease_identifier(r);
match (l_num, r_num) {
(Some(ln), Some(rn)) if l_prefix == r_prefix => {
match ln.cmp(&rn) {
Ordering::Equal => continue,
other => return other,
}
}
(Some(ln), Some(rn)) if l_prefix == r_prefix => match ln.cmp(&rn) {
Ordering::Equal => continue,
other => return other,
},
_ => {
let prefix_cmp = l_prefix.cmp(r_prefix);
if prefix_cmp != Ordering::Equal {