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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user