From ae37060160d8a1d421713728b7f8a9a6733235fa Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Fri, 31 Jul 2026 23:28:53 +0200 Subject: [PATCH] fix(daemon): drop unneeded Arc from daemon_writer's Mutex return type --- crates/xy/src/logging.rs | 6 +++--- crates/xy/src/main.rs | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/xy/src/logging.rs b/crates/xy/src/logging.rs index cfd6512..d1d2f2a 100644 --- a/crates/xy/src/logging.rs +++ b/crates/xy/src/logging.rs @@ -1,15 +1,15 @@ use std::path::Path; -use std::sync::{Arc, Mutex}; +use std::sync::Mutex; use xy_supervisor::logs::RotatingLogWriter; const LOG_FILE_MAX_BYTES: u64 = 10 * 1024 * 1024; const LOG_FILE_KEEP: usize = 5; -pub(crate) fn daemon_writer(log_dir: &Path) -> std::io::Result>> { +pub(crate) fn daemon_writer(log_dir: &Path) -> std::io::Result> { let writer = RotatingLogWriter::open(&log_dir.join("xy.log"), LOG_FILE_MAX_BYTES, LOG_FILE_KEEP)?; - Ok(Arc::new(Mutex::new(writer))) + Ok(Mutex::new(writer)) } #[cfg(test)] diff --git a/crates/xy/src/main.rs b/crates/xy/src/main.rs index 00e05b0..9e1ca0d 100644 --- a/crates/xy/src/main.rs +++ b/crates/xy/src/main.rs @@ -1,5 +1,4 @@ use clap::{Parser, Subcommand}; -use std::sync::Arc; mod cli; mod daemon; @@ -86,8 +85,6 @@ async fn main() -> std::process::ExitCode { } }; - let file = Arc::into_inner(file).expect("daemon_writer arc has one owner"); - tracing_subscriber::fmt() .with_env_filter(filter) .with_ansi(false)