Skip to content

Commit 676a980

Browse files
committed
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.
1 parent aa50cc6 commit 676a980

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/key.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -696,13 +696,7 @@ impl KeyPair {
696696
&mut self.0
697697
}
698698

699-
/// Creates a Schnorr [`KeyPair`] directly from generic Secp256k1 secret key.
700-
///
701-
/// # Panics
702-
///
703-
/// Panics if internal representation of the provided [`SecretKey`] does not hold correct secret
704-
/// key value obtained from Secp256k1 library previously, specifically when secret key value is
705-
/// out-of-range (0 or in excess of the group order).
699+
/// Creates a [`KeyPair`] directly from a Secp256k1 secret key.
706700
#[inline]
707701
pub fn from_secret_key<C: Signing>(
708702
secp: &Secp256k1<C>,

0 commit comments

Comments
 (0)