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:
Tobin C. Harding 2023-08-08 12:23:33 +10:00
parent ec9c9643d7
commit cf5f1034ca
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 1 deletions

View File

@ -1053,7 +1053,7 @@ impl<'de> serde::Deserialize<'de> for KeyPair {
let ctx = Secp256k1::signing_only(); let ctx = Secp256k1::signing_only();
#[cfg(not(any(feature = "global-context", feature = "alloc")))] #[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)] #[allow(clippy::needless_borrow)]
KeyPair::from_seckey_slice(&ctx, data) KeyPair::from_seckey_slice(&ctx, data)