1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-25 14:46:04 +02:00

simplify methods of awc::connect::Connect trait (#1941)

This commit is contained in:
fakeshadow
2021-02-07 10:56:39 -08:00
committed by GitHub
parent deafb7c8b8
commit 4c243cbf89
4 changed files with 49 additions and 165 deletions

View File

@@ -223,15 +223,3 @@ impl Encoder<Message<(RequestHeadType, BodySize)>> for ClientCodec {
Ok(())
}
}
pub struct Writer<'a>(pub &'a mut BytesMut);
impl<'a> io::Write for Writer<'a> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.0.extend_from_slice(buf);
Ok(buf.len())
}
fn flush(&mut self) -> io::Result<()> {
Ok(())
}
}