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:
1 parent
5c029a982a
commit
94195db16a
3 files changed
+11
-8
No files matched your search
@@ -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<Vec<FileEntry>, String>| {
|
||||
matches!(result, Err(why) if why == refusal)
|
||||
};
|
||||
let refused =
|
||||
|result: &Result<Vec<FileEntry>, String>| matches!(result, Err(why) if why == refusal);
|
||||
let mut request = 0;
|
||||
|
||||
// Refused here: nothing reaches the host.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user