From 0ad414a9825f8a3e8d634ee3207e44538497b09b Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Fri, 7 Jan 2022 08:58:25 +1100 Subject: [PATCH] Remove unneeded return statements Clippy emits a few warnings: warning: unneeded `return` statement As suggested, remove the unneeded return statements. --- src/ecdsa/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ecdsa/mod.rs b/src/ecdsa/mod.rs index df4a24e..cedd844 100644 --- a/src/ecdsa/mod.rs +++ b/src/ecdsa/mod.rs @@ -386,7 +386,7 @@ impl Secp256k1 { /// Requires a signing capable context. pub fn sign_ecdsa_grind_r(&self, msg: &Message, sk: &SecretKey, bytes_to_grind: usize) -> Signature { let len_check = |s : &ffi::Signature| der_length_check(s, 71 - bytes_to_grind); - return self.sign_grind_with_check(msg, sk, len_check); + self.sign_grind_with_check(msg, sk, len_check) } /// Constructs a signature for `msg` using the secret key `sk`, RFC6979 nonce @@ -397,7 +397,7 @@ impl Secp256k1 { /// Requires a signing capable context. #[deprecated(since = "0.21.0", note = "Use sign_ecdsa_grind_r instead.")] pub fn sign_low_r(&self, msg: &Message, sk: &SecretKey) -> Signature { - return self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit) + self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit) } /// Constructs a signature for `msg` using the secret key `sk`, RFC6979 nonce @@ -407,7 +407,7 @@ impl Secp256k1 { /// will perform two signing operations. /// Requires a signing capable context. pub fn sign_ecdsa_low_r(&self, msg: &Message, sk: &SecretKey) -> Signature { - return self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit) + self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit) } }