From 04c33185d84f37d04430fee100fefc463aa2c06e Mon Sep 17 00:00:00 2001 From: Elena Frank Date: Sun, 14 Aug 2022 04:03:04 +0200 Subject: [PATCH] *: Fix `clippy::derive-partial-eq-without-eq` (#2818) --- src/behaviour.rs | 2 +- src/behaviour/as_client.rs | 4 ++-- src/behaviour/as_server.rs | 4 ++-- src/lib.rs | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/behaviour.rs b/src/behaviour.rs index f98bf5af532..b39a7b141b4 100644 --- a/src/behaviour.rs +++ b/src/behaviour.rs @@ -130,7 +130,7 @@ impl ProbeId { } /// Event produced by [`Behaviour`]. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum Event { /// Event on an inbound probe. InboundProbe(InboundProbeEvent), diff --git a/src/behaviour/as_client.rs b/src/behaviour/as_client.rs index 8d0097deab8..5a5e18b6531 100644 --- a/src/behaviour/as_client.rs +++ b/src/behaviour/as_client.rs @@ -40,7 +40,7 @@ use std::{ }; /// Outbound probe failed or was aborted. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum OutboundProbeError { /// Probe was aborted because no server is known, or all servers /// are throttled through [`Config::throttle_server_period`]. @@ -54,7 +54,7 @@ pub enum OutboundProbeError { Response(ResponseError), } -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum OutboundProbeEvent { /// A dial-back request was sent to a remote peer. Request { diff --git a/src/behaviour/as_server.rs b/src/behaviour/as_server.rs index 9b045c02b4c..681076b92cb 100644 --- a/src/behaviour/as_server.rs +++ b/src/behaviour/as_server.rs @@ -38,7 +38,7 @@ use std::{ }; /// Inbound probe failed. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum InboundProbeError { /// Receiving the dial-back request or sending a response failed. InboundRequest(InboundFailure), @@ -46,7 +46,7 @@ pub enum InboundProbeError { Response(ResponseError), } -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum InboundProbeEvent { /// A dial-back request was received from a remote peer. Request { diff --git a/src/lib.rs b/src/lib.rs index 3a1bf63cc8e..b21c73dd0d0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,6 +31,7 @@ pub use self::{ }; pub use libp2p_request_response::{InboundFailure, OutboundFailure}; +#[allow(clippy::derive_partial_eq_without_eq)] mod structs_proto { include!(concat!(env!("OUT_DIR"), "/structs.rs")); }