fix(#1375): clean up pedantic warnings and re-enable -D warnings without pedantic bypass

This commit is contained in:
damocles 2026-06-05 15:59:45 +02:00 committed by mara
commit fb726197ea
28 changed files with 109 additions and 90 deletions

View file

@ -65,7 +65,8 @@ fn format_task(id: &str, task: &serde_json::Value) -> String {
let now = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap_or_default()
.as_secs() as i64;
.as_secs()
.cast_signed();
let _ = write!(out, ", running for {}s", now - started);
}
if let (Some(completed), Some(started)) =
@ -76,8 +77,8 @@ fn format_task(id: &str, task: &serde_json::Value) -> String {
let out_file = paths::task_out(id);
let err_file = paths::task_err(id);
let out_len = std::fs::metadata(&out_file).map(|m| m.len()).unwrap_or(0);
let err_len = std::fs::metadata(&err_file).map(|m| m.len()).unwrap_or(0);
let out_len = std::fs::metadata(&out_file).map_or(0, |m| m.len());
let err_len = std::fs::metadata(&err_file).map_or(0, |m| m.len());
if let Some(stdout) = task["stdout_tail"].as_str() {
let s = stdout.trim();
@ -151,6 +152,7 @@ struct BashRunArgs {
wait_seconds: Option<u64>,
}
#[allow(clippy::unnecessary_wraps)]
fn default_wait() -> Option<u64> {
Some(3)
}