From ed29f122161594acbde95aab2cd54d78ee7f07b0 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Tue, 22 Dec 2020 13:38:02 +1100 Subject: [PATCH] Remove unnecessary return statements Found by clippy. We don't need a `return` for the final statement. --- src/schnorrsig.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/schnorrsig.rs b/src/schnorrsig.rs index 858a1d5..3a9ca76 100644 --- a/src/schnorrsig.rs +++ b/src/schnorrsig.rs @@ -185,11 +185,11 @@ impl KeyPair { tweak.as_c_ptr(), ); - return if err == 1 { + if err == 1 { Ok(()) } else { Err(Error::InvalidTweak) - }; + } } } } @@ -465,11 +465,11 @@ impl Secp256k1 { pubkey.as_c_ptr(), ); - return if ret == 1 { + if ret == 1 { Ok(()) } else { Err(Error::InvalidSignature) - }; + } } }