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] #[test]
fn either_body_works() { fn either_body_works() {
let body = EitherBody::new(()); let _body = EitherBody::new(());
} }
} }

View File

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

View File

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