1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-20 04:35:38 +02:00

remove some unsafe code

This commit is contained in:
Nikolay Kim
2018-06-19 07:44:01 +06:00
parent 68cd5bdf68
commit 261ad31b9a
10 changed files with 64 additions and 87 deletions

View File

@@ -77,7 +77,7 @@ impl<H: 'static> Writer for H2Writer<H> {
}
#[inline]
fn buffer(&self) -> &mut BytesMut {
fn buffer(&mut self) -> &mut BytesMut {
self.buffer.get_mut()
}
@@ -164,7 +164,7 @@ impl<H: 'static> Writer for H2Writer<H> {
}
}
fn write(&mut self, payload: Binary) -> io::Result<WriterState> {
fn write(&mut self, payload: &Binary) -> io::Result<WriterState> {
self.written = payload.len() as u64;
if !self.flags.contains(Flags::DISCONNECTED) {