THRIFT-5043 Make TBufferChannel clonable
Client: Rust
Patch: Julian Tescher
This closes #1956
It is useful for `TBufferChannel` to be `Clone` so that you can use it to read bytes that were written by a client for use cases like testing or sending over alternative transports like UDP.
diff --git a/lib/rs/src/transport/mem.rs b/lib/rs/src/transport/mem.rs
index 82c4b57..9874257 100644
--- a/lib/rs/src/transport/mem.rs
+++ b/lib/rs/src/transport/mem.rs
@@ -31,7 +31,7 @@
/// `set_readable_bytes(...)`. Callers can then read until the buffer is
/// depleted. No further reads are accepted until the internal read buffer is
/// replenished again.
-#[derive(Debug)]
+#[derive(Clone, Debug)]
pub struct TBufferChannel {
read: Arc<Mutex<ReadData>>,
write: Arc<Mutex<WriteData>>,