THRIFT-5306: Rust code and generated code no longer has clippy warnings (Rust 1.40)
Client: rs
NOTE: Also properly update the min/max supported Rust versions
diff --git a/lib/rs/src/transport/mem.rs b/lib/rs/src/transport/mem.rs
index 68fb265..fe1c543 100644
--- a/lib/rs/src/transport/mem.rs
+++ b/lib/rs/src/transport/mem.rs
@@ -153,7 +153,9 @@
WriteHalf {
handle: TBufferChannel {
read: self.read.clone(),
- write: self.write.clone(),
+ // NOTE: not cloning here, since this is the last statement
+ // in this method and `write` can take ownership of `self.write`
+ write: self.write,
},
},
))