Fix Clippy warnings blocking release checks
Some checks failed
Validate authentication / Validate authentication (push) Failing after 1s
Some checks failed
Validate authentication / Validate authentication (push) Failing after 1s
This commit is contained in:
parent
e71d9c3118
commit
976ffde7a8
42 changed files with 315 additions and 346 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue