apply clippy lints

This commit is contained in:
raf 2024-08-03 23:04:26 +03:00
commit 42a7f2fc77
Signed by: NotAShelf
GPG key ID: AF26552424E53993
5 changed files with 16 additions and 19 deletions

View file

@ -27,15 +27,15 @@ pub fn get_system_uptime() -> Result<String, io::Error> {
let mut parts = Vec::new();
if days > 0 {
parts.push(format!("{} days", days));
parts.push(format!("{days} days"));
}
if hours > 0 || days > 0 {
parts.push(format!("{} hours", hours));
parts.push(format!("{hours} hours"));
}
if minutes > 0 || hours > 0 || days > 0 {
parts.push(format!("{} minutes", minutes));
parts.push(format!("{minutes} minutes"));
}
Ok(parts.join(", "))