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

various cleanups

This commit is contained in:
Nikolay Kim
2017-12-13 11:10:03 -08:00
parent 55204c829c
commit d4187f682b
14 changed files with 70 additions and 63 deletions

View File

@@ -25,7 +25,7 @@ pub(crate) trait IoContext: 'static {
#[derive(Debug)]
pub(crate) enum Frame {
Message(HttpResponse),
Message(Box<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(resp))
self.stream.push_back(Frame::Message(Box::new(resp)))
}
/// Write payload