Target panic message at lib users
Currently the panic message refers to stuff related to development of the library, this is meaningless for users of the lib. Target panic message at secp users instead.
This commit is contained in:
parent
ec9c9643d7
commit
cf5f1034ca
|
@ -1053,7 +1053,7 @@ impl<'de> serde::Deserialize<'de> for KeyPair {
|
|||
let ctx = Secp256k1::signing_only();
|
||||
|
||||
#[cfg(not(any(feature = "global-context", feature = "alloc")))]
|
||||
let ctx: Secp256k1<crate::SignOnlyPreallocated> = panic!("The previous implementation was panicking too, please enable the global-context feature of rust-secp256k1");
|
||||
let ctx: Secp256k1<crate::SignOnlyPreallocated> = panic!("cannot deserialize key pair without a context (please enable either the global-context or alloc feature)");
|
||||
|
||||
#[allow(clippy::needless_borrow)]
|
||||
KeyPair::from_seckey_slice(&ctx, data)
|
||||
|
|
Loading…
Reference in New Issue