From b70da5d144342efaff716f22d9d31513c5e5b442 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 May 2021 13:44:20 +0100 Subject: [PATCH] mgmtchannel: Drop BufReader and BufWriter FrameReader and FrameWriter have internal buffers Signed-off-by: Ian Jackson --- src/mgmtchannel.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 } } -- 2.30.2