*: 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,
}
#[allow(clippy::large_enum_variant)]
enum MyBehaviourEvent {
Kademlia(KademliaEvent),
Mdns(MdnsEvent),

View File

@ -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),

View File

@ -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.
//

View File

@ -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<ping::Event, identify::Event>),