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

rename payload

This commit is contained in:
Nikolay Kim
2018-01-10 20:08:13 -08:00
parent e0faf3f69c
commit aed90ed458
4 changed files with 13 additions and 21 deletions

View File

@@ -107,7 +107,7 @@ impl<A, S> WebsocketContext<A, S> where A: Actor<Context=Self> {
#[inline]
fn write<B: Into<Binary>>(&mut self, data: B) {
if !self.disconnected {
self.stream.push_back(ContextFrame::Payload(Some(data.into())));
self.stream.push_back(ContextFrame::Chunk(Some(data.into())));
} else {
warn!("Trying to write to disconnected response");
}

View File

@@ -224,9 +224,7 @@ impl Frame {
}
/// Write a frame out to a buffer
pub fn format<W>(&mut self, w: &mut W) -> Result<(), Error>
where W: Write
{
pub fn format<W: Write>(&mut self, w: &mut W) -> Result<(), Error> {
let mut one = 0u8;
let code: u8 = self.opcode.into();
if self.finished {