*: Activate clippy::style lint group (#2620)

This commit is contained in:
Hubert
2022-05-03 13:11:48 +02:00
committed by GitHub
parent f46fecd4d7
commit 70d38520fd
35 changed files with 137 additions and 92 deletions

View File

@ -263,7 +263,7 @@ pub enum Error {
#[error("Failed to read/write")]
Io(#[from] std::io::Error),
#[error("Failed to convert wire message to internal data model")]
ConversionError(#[from] ConversionError),
Conversion(#[from] ConversionError),
}
impl From<Message> for wire::Message {

View File

@ -32,6 +32,7 @@ use std::task::{Context, Poll};
/// The state of an inbound substream (i.e. the remote node opened it).
#[allow(clippy::large_enum_variant)]
#[allow(clippy::enum_variant_names)]
pub enum Stream {
/// We are in the process of reading a message from the substream.
PendingRead(Framed<NegotiatedSubstream, RendezvousCodec>),
@ -55,6 +56,7 @@ impl fmt::Debug for Stream {
}
#[allow(clippy::large_enum_variant)]
#[allow(clippy::enum_variant_names)]
#[derive(Debug, Clone)]
pub enum OutEvent {
RegistrationRequested(NewRegistration),

View File

@ -121,6 +121,7 @@ pub enum OutEvent {
}
#[allow(clippy::large_enum_variant)]
#[allow(clippy::enum_variant_names)]
#[derive(Debug)]
pub enum OpenInfo {
RegisterRequest(NewRegistration),

View File

@ -274,6 +274,7 @@ where
}
/// Event sent from the [`libp2p_swarm::NetworkBehaviour`] to the [`SubstreamConnectionHandler`].
#[allow(clippy::enum_variant_names)]
#[derive(Debug)]
pub enum InEvent<I, TInboundEvent, TOutboundEvent> {
/// Open a new substream using the provided `open_info`.