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

Replace brotli with brotli2 #1224

This commit is contained in:
Nikolay Kim
2019-12-20 13:50:07 +06:00
parent 8c54054844
commit 1d12ba9d5f
12 changed files with 108 additions and 139 deletions

View File

@@ -19,12 +19,10 @@ impl Writer {
buf: BytesMut::with_capacity(8192),
}
}
fn take(&mut self) -> Bytes {
self.buf.split().freeze()
}
fn freeze(self) -> Bytes {
self.buf.freeze()
}
}
impl io::Write for Writer {
@@ -32,6 +30,7 @@ impl io::Write for Writer {
self.buf.extend_from_slice(buf);
Ok(buf.len())
}
fn flush(&mut self) -> io::Result<()> {
Ok(())
}