Fix Clippy warnings blocking release checks
Some checks failed
Validate authentication / Validate authentication (push) Failing after 1s

This commit is contained in:
Alois 2026-10-04 21:14:35 +02:00
commit 976ffde7a8
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
42 changed files with 315 additions and 346 deletions

View file

@ -37,6 +37,7 @@ struct ClientSubscription {
metric_interval_ms: u64,
}
#[expect(clippy::large_enum_variant, reason = "keep queued IPC messages inline")]
enum WriterCommand {
Message(DaemonMessage),
Flush {
@ -94,6 +95,7 @@ impl IpcServer {
.join("daemon.lock");
let lock = File::options()
.create(true)
.truncate(false)
.mode(0o600)
.read(true)
.write(true)
@ -478,15 +480,13 @@ async fn handle_client(
Ok(DaemonMessage::LogEntry(entry)) => {
// Filter by subscribed log classes
let log_classes = sub_rx.borrow().log_classes.clone();
if log_classes.is_empty()
|| log_classes.iter().any(|c| entry.sender == *c)
{
if let Err(error) = write_client_message(&mut writer, &DaemonMessage::LogEntry(entry)).await {
if (log_classes.is_empty()
|| log_classes.contains(&entry.sender))
&& let Err(error) = write_client_message(&mut writer, &DaemonMessage::LogEntry(entry)).await {
eprintln!("IPC client writer stopped while sending log message: {error}");
session_cancellation.cancel();
break;
}
}
}
Ok(DaemonMessage::MetricSample(sample)) => {
// Rate-limit metric samples based on subscription interval

View file

@ -3,9 +3,11 @@ use std::time::Duration;
use tokio::sync::Mutex;
use tokio::task::JoinSet;
type TaskOutcome = (String, Result<(), String>);
#[derive(Clone, Default)]
pub struct TaskRegistry {
tasks: Arc<Mutex<JoinSet<(String, Result<(), String>)>>>,
tasks: Arc<Mutex<JoinSet<TaskOutcome>>>,
}
impl TaskRegistry {