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 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-25 03:42:19 +03:00
1 parent 5c029a982a
commit 94195db16a
3 files changed
+11 -8

No files matched your search

+5 -4
View File
@@ -2220,7 +2220,9 @@ async fn ask_files_until(
cmd_tx.send(LinkCmd::ListFiles { request: *request, dir }).ok()?; cmd_tx.send(LinkCmd::ListFiles { request: *request, dir }).ok()?;
let result = loop { let result = loop {
match bus.recv().await { match bus.recv().await {
Ok(Event::FileList { request: answered, result, .. }) if answered == *request => { Ok(Event::FileList { request: answered, result, .. })
if answered == *request =>
{
break result; break result;
} }
Ok(_) | Err(broadcast::error::RecvError::Lagged(_)) => {} 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() .count()
}; };
let refusal = "not offered by this server: files"; let refusal = "not offered by this server: files";
let refused = |result: &Result<Vec<FileEntry>, String>| { let refused =
matches!(result, Err(why) if why == refusal) |result: &Result<Vec<FileEntry>, String>| matches!(result, Err(why) if why == refusal);
};
let mut request = 0; let mut request = 0;
// Refused here: nothing reaches the host. // Refused here: nothing reaches the host.
+2 -1
View File
@@ -4279,7 +4279,8 @@ mod tests {
// encoder from its first frame for longer than that. The deadline only ends // encoder from its first frame for longer than that. The deadline only ends
// a hang. // a hang.
let deadline = Instant::now() + Duration::from_secs(30); 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 { while count(&frames, MediaKind::Audio) < 10 || count(&frames, MediaKind::Video) < 1 {
assert!(Instant::now() < deadline, "no audio or no video in {} frames", frames.len()); assert!(Instant::now() < deadline, "no audio or no video in {} frames", frames.len());
tokio::time::sleep(Duration::from_millis(20)).await; tokio::time::sleep(Duration::from_millis(20)).await;
+4 -3
View File
@@ -1226,9 +1226,10 @@ mod tests {
assert_eq!(studio.status().active_scene, break_id); assert_eq!(studio.status().active_scene, break_id);
// The new scene's source draws, from the first frame composed after the // The new scene's source draws, from the first frame composed after the
// command. // command.
let frame = preview_until(&preview, |f| { let frame = preview_until(
matches!(&f.data, crate::frame::FrameData::Rgba(p) if p.data[..3] == [1, 2, 3]) &preview,
}); |f| matches!(&f.data, crate::frame::FrameData::Rgba(p) if p.data[..3] == [1, 2, 3]),
);
drop(frame); drop(frame);
studio.apply(Command::RemoveScene { scene: break_id }).await.unwrap(); studio.apply(Command::RemoveScene { scene: break_id }).await.unwrap();