From b528d336cd09ccbdcc2a7d1285302c90376b0f0b Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 4 Nov 2022 20:40:09 +1100 Subject: [PATCH] *: Fix clippy warnings introduced by Rust 1.65 release (#3081) --- examples/distributed-key-value-store.rs | 1 + protocols/identify/src/handler.rs | 1 + protocols/kad/src/behaviour.rs | 1 + swarm-derive/tests/test.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/examples/distributed-key-value-store.rs b/examples/distributed-key-value-store.rs index de02ddf8..2f90b4c4 100644 --- a/examples/distributed-key-value-store.rs +++ b/examples/distributed-key-value-store.rs @@ -74,6 +74,7 @@ async fn main() -> Result<(), Box> { mdns: Mdns, } + #[allow(clippy::large_enum_variant)] enum MyBehaviourEvent { Kademlia(KademliaEvent), Mdns(MdnsEvent), diff --git a/protocols/identify/src/handler.rs b/protocols/identify/src/handler.rs index 20db7f84..987b5649 100644 --- a/protocols/identify/src/handler.rs +++ b/protocols/identify/src/handler.rs @@ -91,6 +91,7 @@ pub struct Handler { /// Event produced by the `IdentifyHandler`. #[derive(Debug)] +#[allow(clippy::large_enum_variant)] pub enum Event { /// We obtained identification information from the remote. Identified(Info), diff --git a/protocols/kad/src/behaviour.rs b/protocols/kad/src/behaviour.rs index b267f87d..d5009e0b 100644 --- a/protocols/kad/src/behaviour.rs +++ b/protocols/kad/src/behaviour.rs @@ -2402,6 +2402,7 @@ pub struct PeerRecord { /// /// See [`NetworkBehaviour::poll`]. #[derive(Debug, Clone)] +#[allow(clippy::large_enum_variant)] pub enum KademliaEvent { /// An inbound request has been received and handled. // diff --git a/swarm-derive/tests/test.rs b/swarm-derive/tests/test.rs index 2404ef69..368fc7d3 100644 --- a/swarm-derive/tests/test.rs +++ b/swarm-derive/tests/test.rs @@ -302,6 +302,7 @@ fn with_either() { fn custom_event_with_either() { use either::Either; + #[allow(clippy::large_enum_variant)] enum BehaviourOutEvent { Kad(libp2p::kad::KademliaEvent), PingOrIdentify(Either),