Skip to content

Commit 6248570

Browse files
committed
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.
1 parent 8a5e165 commit 6248570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ impl<'de> serde::Deserialize<'de> for KeyPair {
10531053
let ctx = Secp256k1::signing_only();
10541054

10551055
#[cfg(not(any(feature = "global-context", feature = "alloc")))]
1056-
let ctx: Secp256k1<crate::SignOnlyPreallocated> = panic!("The previous implementation was panicking too, please enable the global-context feature of rust-secp256k1");
1056+
let ctx: Secp256k1<crate::SignOnlyPreallocated> = panic!("cannot deserialize key pair without a context (please enable either the global-context or alloc feature)");
10571057

10581058
#[allow(clippy::needless_borrow)]
10591059
KeyPair::from_seckey_slice(&ctx, data)

0 commit comments

Comments
 (0)