From ec9c9643d794b7c5b2c4bbe4aeee8b70bf46ff1f Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 8 Aug 2023 12:24:24 +1000 Subject: [PATCH] Allow stuff after unconditional panic We have an unconditional panic for some combination of features, this causes clippy to give a bunch of useless warnings. Add allow attributes to quieten down clippy. --- src/key.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/key.rs b/src/key.rs index 0eb747e..1791dc1 100644 --- a/src/key.rs +++ b/src/key.rs @@ -1036,6 +1036,8 @@ impl serde::Serialize for KeyPair { } #[cfg(feature = "serde")] +#[allow(unused_variables)] // For `data` under some feature combinations (the unconditional panic below). +#[allow(unreachable_code)] // For `KeyPair::from_seckey_slice` after unconditional panic. impl<'de> serde::Deserialize<'de> for KeyPair { fn deserialize>(d: D) -> Result { if d.is_human_readable() {