THRIFT-5600: rust lib to upgrade to edition 2021
Client: rs
Patch: Jiayu Liu

This closes #2628
diff --git a/test/rs/Cargo.toml b/test/rs/Cargo.toml
index 401282a..b039fff 100644
--- a/test/rs/Cargo.toml
+++ b/test/rs/Cargo.toml
@@ -1,7 +1,7 @@
 [package]
 name = "thrift-test"
 version = "0.1.0"
-edition = "2018"
+edition = "2021"
 license = "Apache-2.0"
 authors = ["Apache Thrift Developers <dev@thrift.apache.org>"]
 publish = false
diff --git a/test/rs/src/bin/test_server.rs b/test/rs/src/bin/test_server.rs
index a27bd77..92a4bcc 100644
--- a/test/rs/src/bin/test_server.rs
+++ b/test/rs/src/bin/test_server.rs
@@ -254,7 +254,7 @@
         info!("testMapMap({})", hello);
 
         let mut inner_map_0: BTreeMap<i32, i32> = BTreeMap::new();
-        for i in -4..0 {
+        for i in -4..0_i32 {
             inner_map_0.insert(i, i);
         }
 
diff --git a/test/rs/src/lib.rs b/test/rs/src/lib.rs
index 9cfd7a6..7c53620 100644
--- a/test/rs/src/lib.rs
+++ b/test/rs/src/lib.rs
@@ -15,5 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+// FIXME - need changes in gen before lifting this exception
+#![allow(
+    clippy::match_single_binding,
+    clippy::unnecessary_wraps,
+    clippy::derivable_impls
+)]
 mod thrift_test;
 pub use crate::thrift_test::*;