mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
refactor: update to rust 2024, fix strict clippy warnings
This commit is contained in:
parent
79c917857c
commit
202c19efd4
57 changed files with 132 additions and 124 deletions
|
@ -394,7 +394,7 @@ impl Client {
|
|||
}
|
||||
|
||||
/// Gets system uptime formatted as `HH:mm`.
|
||||
pub fn uptime(&self) -> String {
|
||||
pub fn uptime() -> String {
|
||||
let uptime = System::uptime();
|
||||
let hours = uptime / 3600;
|
||||
format!("{:0>2}:{:0>2}", hours, (uptime % 3600) / 60)
|
||||
|
@ -513,7 +513,7 @@ impl Namespace for Client {
|
|||
TokenType::LoadAverage1 => get(self.load_average_1()),
|
||||
TokenType::LoadAverage5 => get(self.load_average_5()),
|
||||
TokenType::LoadAverage15 => get(self.load_average_15()),
|
||||
TokenType::Uptime => Some(self.uptime()),
|
||||
TokenType::Uptime => Some(Client::uptime()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue