Ver Fonte

Address clippy warnings in tests.

Jing Yang há 3 anos atrás
pai
commit
c7a6b12213

+ 1 - 0
kvraft/src/server.rs

@@ -55,6 +55,7 @@ struct KVServerState {
             >,
         ),
     >,
+    #[allow(clippy::type_complexity)]
     #[serde(skip)]
     index_subscribers: HashMap<
         Index,

+ 2 - 2
linearizability/src/offset_linked_list.rs

@@ -168,12 +168,12 @@ mod tests {
             leg = list.succ(leg).unwrap();
         }
         list.lift(leg);
-        assert_char_list_eq(&list, &"bcefhilmnopqrstuvwxyz");
+        assert_char_list_eq(&list, "bcefhilmnopqrstuvwxyz");
 
         list.unlift(NodeRef(0));
         list.unlift(NodeRef(3));
         list.unlift(NodeRef(10));
-        assert_char_list_eq(&list, &"abcdefhiklmnopqrstuvwxyz");
+        assert_char_list_eq(&list, "abcdefhiklmnopqrstuvwxyz");
     }
 
     #[test]

+ 1 - 1
test_configs/src/kvraft/generic_test.rs

@@ -299,7 +299,7 @@ pub fn generic_test(test_params: GenericTestParams) {
         let start = Instant::now();
         log::info!("Searching for linearization arrangements ...");
         assert!(
-            linearizability::check_operations_timeout::<KvModel>(&ops, None),
+            linearizability::check_operations_timeout::<KvModel>(ops, None),
             "History {:?} is not linearizable,",
             ops,
         );

+ 1 - 1
test_utils/src/logging.rs

@@ -59,7 +59,7 @@ pub fn init_log(module: &str) -> std::io::Result<PathBuf> {
 
     let module = match module.rfind("::") {
         Some(pos) => &module[..pos],
-        None => &module,
+        None => module,
     };
 
     let env = env_logger::Env::default().default_filter_or("info");

+ 1 - 0
test_utils/src/thread_local_logger.rs

@@ -101,6 +101,7 @@ impl LocalLogger {
     }
 }
 
+#[allow(clippy::derivable_impls)]
 impl Default for LocalLogger {
     fn default() -> Self {
         #[cfg(not(feature = "must-log"))]