This commit is contained in:
Rob Ede 2021-11-24 14:20:12 +00:00
parent 966875b349
commit d284875391
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 5 additions and 4 deletions

View File

@ -78,6 +78,6 @@ mod tests {
#[test]
fn either_body_works() {
let body = EitherBody::new(());
let _body = EitherBody::new(());
}
}

View File

@ -1,5 +1,6 @@
use std::{
cell::{Ref, RefMut},
error::Error as StdError,
fmt,
future::Future,
mem,
@ -8,7 +9,7 @@ use std::{
};
use actix_http::{
body::{AnyBody, MessageBody},
body::{AnyBody, BoxBody, MessageBody},
http::{header::HeaderMap, StatusCode},
Extensions, Response, ResponseHead,
};
@ -229,7 +230,7 @@ impl<B> HttpResponse<B> {
// TODO: into_body equivalent
pub(crate) fn into_boxed_body(self) -> HttpResponse<BoxBody>
pub fn into_boxed_body(self) -> HttpResponse<BoxBody>
where
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError + 'static>>,

View File

@ -3,7 +3,7 @@ use std::rc::Rc;
use std::{fmt, net};
use actix_http::{
body::{AnyBody, BoxBody, MessageBody},
body::{AnyBody, MessageBody},
http::{HeaderMap, Method, StatusCode, Uri, Version},
Extensions, HttpMessage, Payload, PayloadStream, RequestHead, Response, ResponseHead,
};