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:
parent
aa50cc6ced
commit
676a9800df
|
@ -696,13 +696,7 @@ impl KeyPair {
|
||||||
&mut self.0
|
&mut self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a Schnorr [`KeyPair`] directly from generic Secp256k1 secret key.
|
/// Creates a [`KeyPair`] directly from a 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).
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_secret_key<C: Signing>(
|
pub fn from_secret_key<C: Signing>(
|
||||||
secp: &Secp256k1<C>,
|
secp: &Secp256k1<C>,
|
||||||
|
|
Loading…
Reference in New Issue