From 3102a48d3969b5ab65b655007a4bffa458a4b539 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 23 Jun 2022 13:47:22 +1000 Subject: [PATCH] Allow clippy::collapsible_else_if clippy emits: warning: this `else { if .. }` block can be collapsed In this instance the code is more readable how it is, we should ignore clippy. Add compiler directive to quieten warning. --- src/util/key.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/key.rs b/src/util/key.rs index 3ea21066..bbb9e0ac 100644 --- a/src/util/key.rs +++ b/src/util/key.rs @@ -411,6 +411,7 @@ impl<'de> ::serde::Deserialize<'de> for PrivateKey { #[cfg(feature = "serde")] #[cfg_attr(docsrs, doc(cfg(feature = "serde")))] +#[allow(clippy::collapsible_else_if)] // Aids readability. impl ::serde::Serialize for PublicKey { fn serialize(&self, s: S) -> Result { if s.is_human_readable() {