This commit is contained in:
fakeshadow 2021-04-16 10:59:31 +08:00
parent 8050db5b65
commit 3d99595d15
1 changed files with 5 additions and 1 deletions

View File

@ -998,6 +998,7 @@ mod tests {
use bytes::Bytes;
use super::*;
use crate::body::BodyStream;
use crate::{
error::Error,
h1::{ExpectHandler, UpgradeHandler},
@ -1042,7 +1043,10 @@ mod tests {
}
fn_service(|_req: Request| async {
Ok::<_, Error>(Response::Ok().streaming(Box::pin(PendingForever)))
Ok::<_, Error>(
Response::ok()
.set_body(Body::from_message(BodyStream::new(PendingForever))),
)
})
}