From c2f6e172bba692294cdb5c870d8aafdeec49f3b5 Mon Sep 17 00:00:00 2001 From: Jon Kinney Date: Wed, 6 May 2026 14:41:21 -0500 Subject: [PATCH] chore: cargo fmt for peer-version code --- lan-mouse-gtk/src/client_row.rs | 12 ++++++------ lan-mouse-gtk/src/lib.rs | 1 - src/connect.rs | 5 ++++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lan-mouse-gtk/src/client_row.rs b/lan-mouse-gtk/src/client_row.rs index 1c1cd68..51a3788 100644 --- a/lan-mouse-gtk/src/client_row.rs +++ b/lan-mouse-gtk/src/client_row.rs @@ -177,12 +177,12 @@ impl ClientRow { None => format!( r##"Peer version: unknown · Ours: {local}"## ), - Some(p) if p == local.as_str() => format!( - r##"Peer version: {p} · matched"## - ), - Some(p) => format!( - r##"Peer version: {p} · Ours: {local}"## - ), + Some(p) if p == local.as_str() => { + format!(r##"Peer version: {p} · matched"##) + } + Some(p) => { + format!(r##"Peer version: {p} · Ours: {local}"##) + } }; self.set_subtitle(&markup); } diff --git a/lan-mouse-gtk/src/lib.rs b/lan-mouse-gtk/src/lib.rs index 7809487..ba06b22 100644 --- a/lan-mouse-gtk/src/lib.rs +++ b/lan-mouse-gtk/src/lib.rs @@ -54,7 +54,6 @@ pub fn run(local_commit: [u8; 8]) -> Result<(), GtkError> { .set(local_commit) .expect("local_commit set once"); - #[cfg(windows)] let ret = std::thread::Builder::new() .stack_size(8 * 1024 * 1024) // https://gitlab.gnome.org/GNOME/gtk/-/commit/52dbb3f372b2c3ea339e879689c1de535ba2c2c3 -> caused crash on windows diff --git a/src/connect.rs b/src/connect.rs index 721f049..417d913 100644 --- a/src/connect.rs +++ b/src/connect.rs @@ -203,7 +203,10 @@ async fn connect_to_handle( // mirrors a Hello back so the receive loop can populate // `peer_commit`. Old peers will silently skip this event // per the forward-compat handler in [`receive_loop`]. - let (buf, len) = ProtoEvent::Hello { commit: local_commit() }.into(); + let (buf, len) = ProtoEvent::Hello { + commit: local_commit(), + } + .into(); if let Err(e) = conn.send(&buf[..len]).await { log::debug!("hello send to {addr} failed: {e}"); }