]> git.bitcoin.ninja Git - rust-lightning/commitdiff
`rustfmt`: Run on `util/fuzz_wrappers.rs`
authorElias Rohrer <dev@tnull.de>
Wed, 18 Sep 2024 07:39:50 +0000 (09:39 +0200)
committerElias Rohrer <dev@tnull.de>
Thu, 19 Sep 2024 07:33:34 +0000 (09:33 +0200)
lightning/src/util/fuzz_wrappers.rs

index dec3d8f6590ac44eef0e1b2754e9c88191c4f0e0..6475065b8beb4f8fdca18953522f9f0ca528d90d 100644 (file)
@@ -8,19 +8,17 @@
 // licenses.
 
 macro_rules! hash_to_message {
-       ($slice: expr) => {
+       ($slice: expr) => {{
+               #[cfg(not(fuzzing))]
                {
-                       #[cfg(not(fuzzing))]
-                       {
-                               ::bitcoin::secp256k1::Message::from_digest_slice($slice).unwrap()
-                       }
-                       #[cfg(fuzzing)]
-                       {
-                               match ::bitcoin::secp256k1::Message::from_digest_slice($slice) {
-                                       Ok(msg) => msg,
-                                       Err(_) => ::bitcoin::secp256k1::Message::from_digest([1; 32])
-                               }
+                       ::bitcoin::secp256k1::Message::from_digest_slice($slice).unwrap()
+               }
+               #[cfg(fuzzing)]
+               {
+                       match ::bitcoin::secp256k1::Message::from_digest_slice($slice) {
+                               Ok(msg) => msg,
+                               Err(_) => ::bitcoin::secp256k1::Message::from_digest([1; 32]),
                        }
                }
-       }
+       }};
 }