From cf5f1034cad0fbeae5e995442f7fd80e8eaa3edf Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 8 Aug 2023 12:23:33 +1000 Subject: [PATCH] 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. --- src/key.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/key.rs b/src/key.rs index 1791dc1..ecec179 100644 --- a/src/key.rs +++ b/src/key.rs @@ -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 = panic!("The previous implementation was panicking too, please enable the global-context feature of rust-secp256k1"); + let ctx: Secp256k1 = 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)