THRIFT-4099: Derive Hash trait for Rust structs
Client: rs

This closes #1246
diff --git a/lib/rs/src/transport/mem.rs b/lib/rs/src/transport/mem.rs
index 8ec2a98..97ec503 100644
--- a/lib/rs/src/transport/mem.rs
+++ b/lib/rs/src/transport/mem.rs
@@ -109,7 +109,7 @@
         let buf = {
             let b = self.write_buffer_as_ref();
             let mut b_ret = vec![0; b.len()];
-            b_ret.copy_from_slice(&b);
+            b_ret.copy_from_slice(b);
             b_ret
         };
 
diff --git a/lib/rs/test/thrifts/Base_One.thrift b/lib/rs/test/thrifts/Base_One.thrift
index ceb1207..3da083d 100644
--- a/lib/rs/test/thrifts/Base_One.thrift
+++ b/lib/rs/test/thrifts/Base_One.thrift
@@ -31,6 +31,10 @@
 
 const list<Temperature> Temperatures = [10, 11, 22, 33]
 
+// IMPORTANT: temps should end with ".0" because this tests
+// that we don't have a problem with const float list generation
+const list<double> CommonTemperatures = [300.0, 450.0]
+
 const double MealsPerDay = 2.5;
 
 struct Noodle {
@@ -48,6 +52,21 @@
   1: Size size
 }
 
+struct MeasuringCup {
+  1: double millis
+}
+
+union MeasuringAids {
+  1: MeasuringSpoon spoon
+  2: MeasuringCup cup
+}
+
+struct CookingTemperatures {
+  1: set<double> commonTemperatures
+  2: list<double> usedTemperatures
+  3: map<double, double> fahrenheitToCentigradeConversions
+}
+
 struct Recipe {
   1: string recipeName
   2: string cuisine