style: apply rustfmt formatting to test

This commit is contained in:
Rachit2323 2026-05-03 16:54:35 +05:30
parent a09b738d04
commit 7ee2a62944
1 changed files with 4 additions and 4 deletions

View File

@ -415,8 +415,9 @@ async fn test_compress_streaming_flushes_chunks() {
use futures_util::StreamExt as _;
let srv = actix_test::start_with(actix_test::config().h1(), || {
App::new().wrap(Compress::default()).service(
web::resource("/").route(web::get().to(|| async {
App::new()
.wrap(Compress::default())
.service(web::resource("/").route(web::get().to(|| async {
// Two-chunk stream: first chunk arrives immediately, second after 500ms.
// Without the flush fix both chunks arrive together after 500ms.
let s = futures_util::stream::once(async {
@ -427,8 +428,7 @@ async fn test_compress_streaming_flushes_chunks() {
Ok::<_, std::io::Error>(Bytes::from(" world"))
}));
HttpResponse::Ok().streaming(s)
})),
)
})))
});
let mut res = srv