Skip to content

Commit

Permalink
chore: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Jun 20, 2024
1 parent c06386f commit d4a9743
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/net/network/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ where
Arc::clone(&num_active_peers),
Arc::new(Mutex::new(listener_addr)),
to_manager_tx,
mutex_engine_rx.clone(),
mutex_engine_rx,
secret_key,
local_peer_id,
peers_handle,
Expand Down Expand Up @@ -540,7 +540,7 @@ where
self.swarm.state_mut().on_new_block_hashes(peer_id, hashes.clone().0);
// notify task engine
self.notify_engine_task(EngineMessage::NewBlockHashes(BlockHashesEvent {
hashes: hashes.clone().into(),
hashes: hashes.into(),
}));
}
#[cfg(feature = "bsc")]
Expand All @@ -550,7 +550,7 @@ where
self.block_import.on_new_block(peer_id, block.clone());
// notify task engine
self.notify_engine_task(EngineMessage::NewBlock(BlockEvent {
hash: block.hash.clone(),
hash: block.hash,
block: block.block.clone(),
}));
}
Expand Down
2 changes: 1 addition & 1 deletion crates/net/network/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl fmt::Debug for PeerRequestSender {
}
}

/// All message variants that can be sent to TaskEngine.
/// All message variants that can be sent to `TaskEngine`.
#[derive(Debug)]
pub enum EngineMessage {
/// Announce new block hashes
Expand Down
2 changes: 1 addition & 1 deletion crates/net/network/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub(crate) const NETWORK_POOL_TRANSACTIONS_SCOPE: &str = "network.pool.transacti
/// Scope for monitoring transactions sent from the manager to the tx manager
pub(crate) const NETWORK_PEER_SCOPE: &str = "network.peer.message";

/// Metrics for the entire network, handled by NetworkManager
/// Metrics for the entire network, handled by `NetworkManager`
#[derive(Metrics)]
#[metrics(scope = "network")]
pub struct NetworkMetrics {
Expand Down
2 changes: 1 addition & 1 deletion crates/net/network/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl NetworkHandle {

/// Returns a sharable [`UnboundedReceiver<EngineMessage>`] that can be cloned and shared.
///
/// The Engine message is used to communicate between the network and the EngineTask.
/// The Engine message is used to communicate between the network and the `EngineTask`.
pub fn get_to_engine_rx(&self) -> Arc<Mutex<UnboundedReceiver<EngineMessage>>> {
self.inner.engine_rx.clone()
}
Expand Down

0 comments on commit d4a9743

Please sign in to comment.