From 94195db16a6137421ac8a9b70e52c7d23f46ea40 Mon Sep 17 00:00:00 2001 From: faumaray Date: Sun, 25 Oct 2026 03:42:19 +0300 Subject: [PATCH] Format four spots of the test changes of this round with rustfmt cargo fmt on the own crates changed these four places of the commits before: the match arm of ask_files_until, the closure of the features test, the count closure of streamer_sends_opus and the call of preview_until in the studio test. No change of meaning. Each of those commits passes clippy on its own; rustfmt was not clean in them until this one. Co-Authored-By: Claude Sonnet 5.5 --- crates/voelin-core/src/link/tests.rs | 9 +++++---- crates/voelin-core/src/media.rs | 3 ++- crates/voelin-media/src/studio/mod.rs | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/crates/voelin-core/src/link/tests.rs b/crates/voelin-core/src/link/tests.rs index faebdcd..7a4e229 100644 --- a/crates/voelin-core/src/link/tests.rs +++ b/crates/voelin-core/src/link/tests.rs @@ -2220,7 +2220,9 @@ async fn ask_files_until( cmd_tx.send(LinkCmd::ListFiles { request: *request, dir }).ok()?; let result = loop { match bus.recv().await { - Ok(Event::FileList { request: answered, result, .. }) if answered == *request => { + Ok(Event::FileList { request: answered, result, .. }) + if answered == *request => + { break result; } Ok(_) | Err(broadcast::error::RecvError::Lagged(_)) => {} @@ -2294,9 +2296,8 @@ async fn the_features_of_a_server_are_the_hosts_narrowed_by_the_servers_list() { .count() }; let refusal = "not offered by this server: files"; - let refused = |result: &Result, String>| { - matches!(result, Err(why) if why == refusal) - }; + let refused = + |result: &Result, String>| matches!(result, Err(why) if why == refusal); let mut request = 0; // Refused here: nothing reaches the host. diff --git a/crates/voelin-core/src/media.rs b/crates/voelin-core/src/media.rs index d35de77..045f3cf 100644 --- a/crates/voelin-core/src/media.rs +++ b/crates/voelin-core/src/media.rs @@ -4279,7 +4279,8 @@ mod tests { // encoder from its first frame for longer than that. The deadline only ends // a hang. let deadline = Instant::now() + Duration::from_secs(30); - let count = |frames: &[EncodedFrame], kind| frames.iter().filter(|f| f.kind == kind).count(); + let count = + |frames: &[EncodedFrame], kind| frames.iter().filter(|f| f.kind == kind).count(); while count(&frames, MediaKind::Audio) < 10 || count(&frames, MediaKind::Video) < 1 { assert!(Instant::now() < deadline, "no audio or no video in {} frames", frames.len()); tokio::time::sleep(Duration::from_millis(20)).await; diff --git a/crates/voelin-media/src/studio/mod.rs b/crates/voelin-media/src/studio/mod.rs index ee5efc9..7879607 100644 --- a/crates/voelin-media/src/studio/mod.rs +++ b/crates/voelin-media/src/studio/mod.rs @@ -1226,9 +1226,10 @@ mod tests { assert_eq!(studio.status().active_scene, break_id); // The new scene's source draws, from the first frame composed after the // command. - let frame = preview_until(&preview, |f| { - matches!(&f.data, crate::frame::FrameData::Rgba(p) if p.data[..3] == [1, 2, 3]) - }); + let frame = preview_until( + &preview, + |f| matches!(&f.data, crate::frame::FrameData::Rgba(p) if p.data[..3] == [1, 2, 3]), + ); drop(frame); studio.apply(Command::RemoveScene { scene: break_id }).await.unwrap();