chiark / gitweb /
mgmtchannels: Make ClientMgmtChannel's read be Send too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 31 May 2021 21:16:21 +0000 (22:16 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 1 Jun 2021 00:32:13 +0000 (01:32 +0100)
We are about to need this

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/mgmtchannel.rs

index 772f0990f377099895c7290bde1b3ee13f0404e3..582949c6fd2cdee314ad4ca5d46d17b81f3645ce 100644 (file)
@@ -47,7 +47,7 @@ impl<R,W> Debug for MgmtChannel<R,W> where R: Read, W: Write {
 }
 
 pub type ClientMgmtChannel = MgmtChannel<
-    Box<dyn Read         + 'static>,
+    Box<dyn Read  + Send + 'static>,
     Box<dyn Write + Send + 'static>,
   >;
 
@@ -63,7 +63,7 @@ impl ClientMgmtChannel {
   }
 
   pub fn new_boxed<R,W>(read: R, write: W) -> Self
-  where R: Read  +        'static,
+  where R: Read  + Send + 'static,
         W: Write + Send + 'static {
     MgmtChannel::new_raw(Box::new(read), Box::new(write))
   }