mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-08 14:03:51 +00:00
apply clippy lints
This commit is contained in:
parent
aae5f71004
commit
42a7f2fc77
5 changed files with 16 additions and 19 deletions
|
|
@ -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(", "))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue