clippy: fix unnecessary_cast lint

https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
This commit is contained in:
xtqqczze
2026-04-16 14:58:19 +01:00
committed by Daniel Hofstetter
parent e88a3063a6
commit 42e668545f
+3 -5
View File
@@ -521,11 +521,9 @@ mod tests {
);
// Boot time should be before current time
let now = Timestamp::now().as_second();
assert!(
(boot_time as i64) < now,
"Boot time should be before current time"
);
let boot_time = Timestamp::from_second(boot_time).unwrap();
let now = Timestamp::now();
assert!(boot_time < now, "Boot time should be before current time");
}
/// Test that get_uptime always succeeds on macOS due to sysctl fallback.