From 8fb3c3f16e8987edbb6cc37d2291d9c88e3d0be3 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 18 Sep 2024 09:39:50 +0200 Subject: [PATCH] `rustfmt`: Run on `util/fuzz_wrappers.rs` --- lightning/src/util/fuzz_wrappers.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lightning/src/util/fuzz_wrappers.rs b/lightning/src/util/fuzz_wrappers.rs index dec3d8f65..6475065b8 100644 --- a/lightning/src/util/fuzz_wrappers.rs +++ b/lightning/src/util/fuzz_wrappers.rs @@ -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]), } } - } + }}; } -- 2.39.5