fix: resolve clippy uninlined_format_args and match_same_arms warnings
This commit is contained in:
+5
-8
@@ -359,17 +359,17 @@ fn run_daemon() -> Result<()> {
|
||||
|
||||
let run_dir = store.base_dir.join("run");
|
||||
std::fs::create_dir_all(&run_dir)?;
|
||||
let socket_path = run_dir.join(format!("{}.sock", session_id));
|
||||
let socket_path = run_dir.join(format!("{session_id}.sock"));
|
||||
let addr = socket_path.to_string_lossy().to_string();
|
||||
|
||||
let server = ipc::server::IpcServer::bind_unix(&addr)?;
|
||||
eprintln!("daemon: listening on {}", addr);
|
||||
eprintln!("daemon: listening on {addr}");
|
||||
|
||||
loop {
|
||||
let mut conn = match server.accept() {
|
||||
Ok(c) => c,
|
||||
Err(e) => {
|
||||
eprintln!("daemon: accept error: {}", e);
|
||||
eprintln!("daemon: accept error: {e}");
|
||||
break;
|
||||
}
|
||||
};
|
||||
@@ -463,7 +463,7 @@ fn run_attach(session_id: &str) -> Result<()> {
|
||||
|
||||
let store = model::store::Store::new();
|
||||
|
||||
let socket_path = store.base_dir.join("run").join(format!("{}.sock", session_id));
|
||||
let socket_path = store.base_dir.join("run").join(format!("{session_id}.sock"));
|
||||
let addr = socket_path.to_string_lossy().to_string();
|
||||
let mut client = ipc::client::IpcClient::connect_unix(&addr)?;
|
||||
|
||||
@@ -547,10 +547,7 @@ fn run_attach(session_id: &str) -> Result<()> {
|
||||
),
|
||||
);
|
||||
}
|
||||
Some(ipc::protocol::DaemonFrame::Closed) => {
|
||||
client_state.quit = true;
|
||||
}
|
||||
None => {
|
||||
Some(ipc::protocol::DaemonFrame::Closed) | None => {
|
||||
client_state.quit = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user