*: Fix clippy::derive-partial-eq-without-eq (#2818)

This commit is contained in:
Elena Frank
2022-08-14 04:03:04 +02:00
committed by GitHub
parent 0a01c81c7b
commit 06aaea67f3
20 changed files with 25 additions and 13 deletions

View File

@ -38,6 +38,7 @@
#[cfg(feature = "serde")]
extern crate _serde as serde;
#[allow(clippy::derive_partial_eq_without_eq)]
mod keys_proto {
include!(concat!(env!("OUT_DIR"), "/keys_proto.rs"));
}
@ -46,6 +47,7 @@ mod envelope_proto {
include!(concat!(env!("OUT_DIR"), "/envelope_proto.rs"));
}
#[allow(clippy::derive_partial_eq_without_eq)]
mod peer_record_proto {
include!(concat!(env!("OUT_DIR"), "/peer_record_proto.rs"));
}

View File

@ -13,7 +13,7 @@ const DOMAIN_SEP: &str = "libp2p-routing-state";
///
/// Peer records are designed to be distributable and carry a signature by being wrapped in a signed envelope.
/// For more information see RFC0003 of the libp2p specifications: <https://github.com/libp2p/specs/blob/master/RFC/0003-routing-records.md>
#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct PeerRecord {
peer_id: PeerId,
seq: u64,

View File

@ -8,7 +8,7 @@ use unsigned_varint::encode::usize_buffer;
/// A signed envelope contains an arbitrary byte string payload, a signature of the payload, and the public key that can be used to verify the signature.
///
/// For more details see libp2p RFC0002: <https://github.com/libp2p/specs/blob/master/RFC/0002-signed-envelopes.md>
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SignedEnvelope {
key: PublicKey,
payload_type: Vec<u8>,