Remove unnecessary panic message

1) All types in rust should have the guarantee that well-formed data is
stored in SecretKey type. Therefore, IMO the panic message is
unnecessary.
This commit is contained in:
sanket1729 2022-03-21 16:29:30 -07:00
parent aa50cc6ced
commit 676a9800df
1 changed files with 1 additions and 7 deletions

View File

@ -696,13 +696,7 @@ impl KeyPair {
&mut self.0
}
/// Creates a Schnorr [`KeyPair`] directly from generic Secp256k1 secret key.
///
/// # Panics
///
/// Panics if internal representation of the provided [`SecretKey`] does not hold correct secret
/// key value obtained from Secp256k1 library previously, specifically when secret key value is
/// out-of-range (0 or in excess of the group order).
/// Creates a [`KeyPair`] directly from a Secp256k1 secret key.
#[inline]
pub fn from_secret_key<C: Signing>(
secp: &Secp256k1<C>,