add use_self clippy lint (#8325)

This commit is contained in:
Thomas Coratger
2024-05-29 15:14:14 +02:00
committed by GitHub
parent 0cb5358fef
commit 19c529e8df
200 changed files with 1817 additions and 1954 deletions

View File

@ -398,38 +398,38 @@ pub enum NodeEvent {
}
impl From<NetworkEvent> for NodeEvent {
fn from(event: NetworkEvent) -> NodeEvent {
NodeEvent::Network(event)
fn from(event: NetworkEvent) -> Self {
Self::Network(event)
}
}
impl From<PipelineEvent> for NodeEvent {
fn from(event: PipelineEvent) -> NodeEvent {
NodeEvent::Pipeline(event)
fn from(event: PipelineEvent) -> Self {
Self::Pipeline(event)
}
}
impl From<BeaconConsensusEngineEvent> for NodeEvent {
fn from(event: BeaconConsensusEngineEvent) -> Self {
NodeEvent::ConsensusEngine(event)
Self::ConsensusEngine(event)
}
}
impl From<ConsensusLayerHealthEvent> for NodeEvent {
fn from(event: ConsensusLayerHealthEvent) -> Self {
NodeEvent::ConsensusLayerHealth(event)
Self::ConsensusLayerHealth(event)
}
}
impl From<PrunerEvent> for NodeEvent {
fn from(event: PrunerEvent) -> Self {
NodeEvent::Pruner(event)
Self::Pruner(event)
}
}
impl From<StaticFileProducerEvent> for NodeEvent {
fn from(event: StaticFileProducerEvent) -> Self {
NodeEvent::StaticFileProducer(event)
Self::StaticFileProducer(event)
}
}