]> Untitled Git - bdk/commitdiff
chore(chain): update test so clippy does not complain
author志宇 <hello@evanlinjin.me>
Mon, 6 May 2024 09:52:11 +0000 (17:52 +0800)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Wed, 8 May 2024 13:49:47 +0000 (15:49 +0200)
crates/chain/src/spk_iter.rs

index c007466ad35025d4ff3a2db2b7937ebf3dffec63..d3a37279418aa15711e39e12c6d77a6ca4ec5556 100644 (file)
@@ -258,18 +258,10 @@ mod test {
             None
         );
     }
+}
 
-    // The following dummy traits were created to test if SpkIterator is working properly.
-    #[allow(unused)]
-    trait TestSendStatic: Send + 'static {
-        fn test(&self) -> u32 {
-            20
-        }
-    }
-
-    impl TestSendStatic for SpkIterator<Descriptor<DescriptorPublicKey>> {
-        fn test(&self) -> u32 {
-            20
-        }
-    }
+#[test]
+fn spk_iterator_is_send_and_static() {
+    fn is_send_and_static<A: Send + 'static>() {}
+    is_send_and_static::<SpkIterator<Descriptor<DescriptorPublicKey>>>()
 }