1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 08:57:00 +02:00

hide httpresponse box

This commit is contained in:
Nikolay Kim
2017-12-15 16:24:15 -08:00
parent c3d5e4301a
commit 1ddcce7b76
8 changed files with 172 additions and 82 deletions

View File

@@ -25,7 +25,7 @@ pub(crate) trait IoContext: 'static {
#[derive(Debug)]
pub(crate) enum Frame {
Message(Box<HttpResponse>),
Message(HttpResponse),
Payload(Option<Binary>),
Drain(Rc<RefCell<DrainFut>>),
}
@@ -141,7 +141,7 @@ impl<A, S> HttpContext<A, S> where A: Actor<Context=Self> {
Body::StreamingContext | Body::UpgradeContext => self.streaming = true,
_ => (),
}
self.stream.push_back(Frame::Message(Box::new(resp)))
self.stream.push_back(Frame::Message(resp))
}
/// Write payload