Add --version flags and more to all binaries
Build and test / check (push) Successful in 1m8s
Build and test / test (push) Successful in 1m46s
Build and test / build (push) Successful in 2m12s
Build and test / docs (push) Successful in 3m18s

This commit is contained in:
2026-01-06 11:48:26 +09:00
parent f0e22fc85c
commit 1aca5d47e3
7 changed files with 36 additions and 1 deletions
+6 -1
View File
@@ -11,6 +11,11 @@ use roowho2_lib::{proto::WhodStatusUpdate, server::rwhod::RwhodClientProxy};
///
/// Machines for which no status report has been received for 11 minutes are shown as being down.
#[derive(Debug, Parser)]
#[command(
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
about,
version
)]
pub struct Args {
/// Users idle an hour or more are not counted unless the `-a` flag is given.
#[arg(long, short)]
@@ -120,7 +125,7 @@ fn old_format_machine_entry(all: bool, entry: &WhodStatusUpdate) -> String {
let uptime_str = if days > 0 {
format!("{:3}+{:02}:{:02}", days, hours, minutes)
} else if uptime_minutes < 0 || days > 999 {
format!(" ??:??")
" ??:??".to_string()
} else {
format!(" {:2}:{:02}", hours, minutes)
};