From 0c71192a2ca65cc17c540385f93dc4ff03a8accd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Oliveira?= Date: Thu, 31 Aug 2023 12:07:03 +0100 Subject: [PATCH] address clippy lints --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 88bf1cf..6dd1e35 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -258,6 +258,7 @@ impl Enr { } /// Reads a custom key from the record if it exists, decoded as data. + #[allow(clippy::missing_panics_doc)] pub fn get(&self, key: impl AsRef<[u8]>) -> Option<&[u8]> { // It's ok to decode any valid RLP value as data self.get_raw_rlp(key).map(|rlp_data| { @@ -401,6 +402,9 @@ impl Enr { } /// Returns the public key of the ENR record. + /// # Panics + /// + /// Will panic if the public key is not supported. #[must_use] pub fn public_key(&self) -> K::PublicKey { K::enr_to_public(&self.content).expect("ENR's can only be created with supported keys") @@ -830,6 +834,7 @@ impl std::fmt::Display for Enr { } } +#[allow(clippy::missing_fields_in_debug)] impl std::fmt::Debug for Enr { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { struct OtherPairs<'a>(&'a BTreeMap);