diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/comm_adapters.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/io/comm_adapters.rs b/src/libstd/io/comm_adapters.rs index 6ed588ac69f..bf2c6dbb623 100644 --- a/src/libstd/io/comm_adapters.rs +++ b/src/libstd/io/comm_adapters.rs @@ -96,6 +96,12 @@ impl ChanWriter { } } +impl Clone for ChanWriter { + fn clone(&self) -> ChanWriter { + ChanWriter { chan: self.chan.clone() } + } +} + impl Writer for ChanWriter { fn write(&mut self, buf: &[u8]) -> IoResult<()> { if !self.chan.try_send(buf.to_owned()) { |
