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.
This commit is contained in:
Tobin C. Harding 2022-06-23 13:47:22 +10:00
parent 63f4ff6406
commit 3102a48d39
1 changed files with 1 additions and 0 deletions

View File

@ -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<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
if s.is_human_readable() {