*: Fix clippy warnings introduced by Rust 1.65 release (#3081)

This commit is contained in:
Thomas Eizinger 2022-11-04 20:40:09 +11:00 committed by GitHub
parent f9b4af3d9d
commit b528d336cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
mdns: Mdns, mdns: Mdns,
} }
#[allow(clippy::large_enum_variant)]
enum MyBehaviourEvent { enum MyBehaviourEvent {
Kademlia(KademliaEvent), Kademlia(KademliaEvent),
Mdns(MdnsEvent), Mdns(MdnsEvent),

View File

@ -91,6 +91,7 @@ pub struct Handler {
/// Event produced by the `IdentifyHandler`. /// Event produced by the `IdentifyHandler`.
#[derive(Debug)] #[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum Event { pub enum Event {
/// We obtained identification information from the remote. /// We obtained identification information from the remote.
Identified(Info), Identified(Info),

View File

@ -2402,6 +2402,7 @@ pub struct PeerRecord {
/// ///
/// See [`NetworkBehaviour::poll`]. /// See [`NetworkBehaviour::poll`].
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
#[allow(clippy::large_enum_variant)]
pub enum KademliaEvent { pub enum KademliaEvent {
/// An inbound request has been received and handled. /// An inbound request has been received and handled.
// //

View File

@ -302,6 +302,7 @@ fn with_either() {
fn custom_event_with_either() { fn custom_event_with_either() {
use either::Either; use either::Either;
#[allow(clippy::large_enum_variant)]
enum BehaviourOutEvent { enum BehaviourOutEvent {
Kad(libp2p::kad::KademliaEvent), Kad(libp2p::kad::KademliaEvent),
PingOrIdentify(Either<ping::Event, identify::Event>), PingOrIdentify(Either<ping::Event, identify::Event>),