From: Ian Jackson Date: Sun, 16 May 2021 12:44:20 +0000 (+0100) Subject: mgmtchannel: Drop BufReader and BufWriter X-Git-Tag: otter-0.6.0~234 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b70da5d144342efaff716f22d9d31513c5e5b442;p=otter.git mgmtchannel: Drop BufReader and BufWriter FrameReader and FrameWriter have internal buffers Signed-off-by: Ian Jackson --- diff --git a/src/mgmtchannel.rs b/src/mgmtchannel.rs index 14726568..f334412e 100644 --- a/src/mgmtchannel.rs +++ b/src/mgmtchannel.rs @@ -35,8 +35,8 @@ impl From for MgmtChannelWriteError { } pub struct MgmtChannel { - pub read: FrameReader>>, - pub write: FrameWriter>>, + pub read: FrameReader>, + pub write: FrameWriter>, } impl Debug for MgmtChannel{ @@ -60,10 +60,8 @@ impl MgmtChannel { pub fn new(conn: U) -> MgmtChannel { let read = conn.try_clone().context("dup the command stream")?; let read = Box::new(read) as Box; - let read = BufReader::new(read); let read = FrameReader::new(read); let write = Box::new(conn) as Box; - let write = BufWriter::new(write); let write = FrameWriter::new(write); MgmtChannel { read, write } }