Skip to content

Commit 024e02d

Browse files
committed
chore: cargo fmt for peer-version code
1 parent 4bc9d83 commit 024e02d

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

lan-mouse-gtk/src/client_row.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ impl ClientRow {
177177
None => format!(
178178
r##"<span foreground="#ffaa33">Peer version: unknown · Ours: {local}</span>"##
179179
),
180-
Some(p) if p == local.as_str() => format!(
181-
r##"<span foreground="#33cc66">Peer version: {p} · matched</span>"##
182-
),
183-
Some(p) => format!(
184-
r##"<span foreground="#ffaa33">Peer version: {p} · Ours: {local}</span>"##
185-
),
180+
Some(p) if p == local.as_str() => {
181+
format!(r##"<span foreground="#33cc66">Peer version: {p} · matched</span>"##)
182+
}
183+
Some(p) => {
184+
format!(r##"<span foreground="#ffaa33">Peer version: {p} · Ours: {local}</span>"##)
185+
}
186186
};
187187
self.set_subtitle(&markup);
188188
}

lan-mouse-gtk/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ pub fn run(local_commit: [u8; 8]) -> Result<(), GtkError> {
5454
.set(local_commit)
5555
.expect("local_commit set once");
5656

57-
5857
#[cfg(windows)]
5958
let ret = std::thread::Builder::new()
6059
.stack_size(8 * 1024 * 1024) // https://gitlab.gnome.org/GNOME/gtk/-/commit/52dbb3f372b2c3ea339e879689c1de535ba2c2c3 -> caused crash on windows

src/connect.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ async fn connect_to_handle(
203203
// mirrors a Hello back so the receive loop can populate
204204
// `peer_commit`. Old peers will silently skip this event
205205
// per the forward-compat handler in [`receive_loop`].
206-
let (buf, len) = ProtoEvent::Hello { commit: local_commit() }.into();
206+
let (buf, len) = ProtoEvent::Hello {
207+
commit: local_commit(),
208+
}
209+
.into();
207210
if let Err(e) = conn.send(&buf[..len]).await {
208211
log::debug!("hello send to {addr} failed: {e}");
209212
}

0 commit comments

Comments
 (0)