Remove unnecessary return statements

Found by clippy. We don't need a `return` for the final statement.
This commit is contained in:
Tobin Harding 2020-12-22 13:38:02 +11:00
parent 4e87e6fe94
commit ed29f12216
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 4 additions and 4 deletions

View File

@ -185,11 +185,11 @@ impl KeyPair {
tweak.as_c_ptr(), tweak.as_c_ptr(),
); );
return if err == 1 { if err == 1 {
Ok(()) Ok(())
} else { } else {
Err(Error::InvalidTweak) Err(Error::InvalidTweak)
}; }
} }
} }
} }
@ -465,11 +465,11 @@ impl<C: Signing> Secp256k1<C> {
pubkey.as_c_ptr(), pubkey.as_c_ptr(),
); );
return if ret == 1 { if ret == 1 {
Ok(()) Ok(())
} else { } else {
Err(Error::InvalidSignature) Err(Error::InvalidSignature)
}; }
} }
} }