From 893f0fa1beae5a4e5ea413c25b586cc73f8887ce Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Sun, 8 Dec 2024 10:02:18 -0600 Subject: [PATCH] wip --- mise.toml | 6 ++++++ src/ipc/client.rs | 1 + 2 files changed, 7 insertions(+) diff --git a/mise.toml b/mise.toml index 7082661..cb616b1 100644 --- a/mise.toml +++ b/mise.toml @@ -16,3 +16,9 @@ run = [ [tools] bun = "latest" + +[tasks.pre-commit] +run = [ + "cargo fmt -- $(git diff --name-only --cached | grep '\\.rs$')", + "git -c advice.addEmptyPathspec=false add $(git diff --name-only --cached | grep '\\.rs$')", +] diff --git a/src/ipc/client.rs b/src/ipc/client.rs index e583939..0a7ae22 100644 --- a/src/ipc/client.rs +++ b/src/ipc/client.rs @@ -30,6 +30,7 @@ impl IpcClient { let conn = interprocess::local_socket::tokio::Stream::connect(fs_name(name)?).await?; let (recv, send) = conn.split(); let recv = BufReader::new(recv); + Ok(Self { id: id.to_string(), recv: Mutex::new(recv),