Skip to content

Commit 99ac11e

Browse files
committed
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.
1 parent 71da2aa commit 99ac11e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util/key.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ impl<'de> ::serde::Deserialize<'de> for PrivateKey {
411411

412412
#[cfg(feature = "serde")]
413413
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
414+
#[allow(clippy::collapsible_else_if)] // Aids readability.
414415
impl ::serde::Serialize for PublicKey {
415416
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
416417
if s.is_human_readable() {

0 commit comments

Comments
 (0)