From c902db2e90d7ca9c13d4c673a866bd5b0afc7f80 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Mon, 29 Jun 2026 15:52:31 -0400 Subject: [PATCH] style: rustfmt the 0.6.2 additions (A17b + version-in-UI) CI's fmt --check caught that Codex's hand-written additions in these two files weren't rustfmt-formatted (the senior gate ran clippy + tests but not fmt --check). Pure line-wrapping, no logic change. Keeps the crate fmt-clean. Co-Authored-By: Claude Opus 4.8 --- src/app/mod.rs | 13 +++++++++---- src/audio/multitrack.rs | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 1d08110..ef6f6c6 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1100,7 +1100,10 @@ fn effective_background_bytes( } pub fn run_gui() -> iced::Result { - crate::log_msg(&format!("PeerSpeak v{} starting", env!("CARGO_PKG_VERSION"))); + crate::log_msg(&format!( + "PeerSpeak v{} starting", + env!("CARGO_PKG_VERSION") + )); // Restore the last window size (saved on close). Position is restored too, // but only on X11 — Wayland's xdg-shell gives clients no way to set their own // position, so we center there and leave placement to the compositor. @@ -5243,9 +5246,11 @@ fn view(state: &AppState) -> Element<'_, AppMessage> { } settings_nav = settings_nav .push(iced::widget::Space::new().height(iced::Length::Fill)) - .push(text(format!("PeerSpeak v{}", env!("CARGO_PKG_VERSION"))) - .size(11) - .color(color_subtext)); + .push( + text(format!("PeerSpeak v{}", env!("CARGO_PKG_VERSION"))) + .size(11) + .color(color_subtext), + ); let settings_nav = container(settings_nav) .padding(12) .width(iced::Length::Fixed(220.0)) diff --git a/src/audio/multitrack.rs b/src/audio/multitrack.rs index a2788a7..06e38f5 100644 --- a/src/audio/multitrack.rs +++ b/src/audio/multitrack.rs @@ -380,7 +380,11 @@ impl MultitrackRecorder { let batch = CycleBatch { new_peers: pending.new_peers, mic_frame, - mix_frame: if self.with_mix { pending.mix_frame } else { None }, + mix_frame: if self.with_mix { + pending.mix_frame + } else { + None + }, peer_frames: pending.peer_frames, }; match self.batch_tx.try_send(batch) { @@ -560,9 +564,15 @@ mod tests { assert_eq!(state.cycles_written, 3); assert_eq!(state.mic.samples.len(), 3 * frame); assert_eq!(state.mix.as_ref().unwrap().samples.len(), 3 * frame); - assert_eq!(&state.mix.as_ref().unwrap().samples[2 * frame..], &[0, 0, 0]); + assert_eq!( + &state.mix.as_ref().unwrap().samples[2 * frame..], + &[0, 0, 0] + ); assert_eq!(state.peers.get(&early).unwrap().samples.len(), 3 * frame); - assert_eq!(&state.peers.get(&early).unwrap().samples[2 * frame..], &[2, 2, 2]); + assert_eq!( + &state.peers.get(&early).unwrap().samples[2 * frame..], + &[2, 2, 2] + ); assert_eq!( state.peers.get(&late).unwrap().samples, vec![0, 0, 0, 0, 0, 0, 7, 7, 7],