Skip to content

Commit 0ad414a

Browse files
committed
Remove unneeded return statements
Clippy emits a few warnings: warning: unneeded `return` statement As suggested, remove the unneeded return statements.
1 parent 6911734 commit 0ad414a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ecdsa/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ impl<C: Signing> Secp256k1<C> {
386386
/// Requires a signing capable context.
387387
pub fn sign_ecdsa_grind_r(&self, msg: &Message, sk: &SecretKey, bytes_to_grind: usize) -> Signature {
388388
let len_check = |s : &ffi::Signature| der_length_check(s, 71 - bytes_to_grind);
389-
return self.sign_grind_with_check(msg, sk, len_check);
389+
self.sign_grind_with_check(msg, sk, len_check)
390390
}
391391

392392
/// Constructs a signature for `msg` using the secret key `sk`, RFC6979 nonce
@@ -397,7 +397,7 @@ impl<C: Signing> Secp256k1<C> {
397397
/// Requires a signing capable context.
398398
#[deprecated(since = "0.21.0", note = "Use sign_ecdsa_grind_r instead.")]
399399
pub fn sign_low_r(&self, msg: &Message, sk: &SecretKey) -> Signature {
400-
return self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit)
400+
self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit)
401401
}
402402

403403
/// Constructs a signature for `msg` using the secret key `sk`, RFC6979 nonce
@@ -407,7 +407,7 @@ impl<C: Signing> Secp256k1<C> {
407407
/// will perform two signing operations.
408408
/// Requires a signing capable context.
409409
pub fn sign_ecdsa_low_r(&self, msg: &Message, sk: &SecretKey) -> Signature {
410-
return self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit)
410+
self.sign_grind_with_check(msg, sk, compact_sig_has_zero_first_bit)
411411
}
412412
}
413413

0 commit comments

Comments
 (0)