mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-31 17:01:58 +00:00
feat(ci): lint against usages of variables with underscore
Prefixing a variable with an underscore (`_`) in Rust indicates that it is not used. Through refactorings, it can sometimes happen that we do end up using such a variable. In this case, the underscore should be removed. Clippy can help us with this. Pull-Request: #3484.
This commit is contained in:
@@ -48,20 +48,20 @@ where
|
||||
|
||||
fn handle_established_inbound_connection(
|
||||
&mut self,
|
||||
_connection_id: ConnectionId,
|
||||
connection_id: ConnectionId,
|
||||
peer: PeerId,
|
||||
local_addr: &Multiaddr,
|
||||
remote_addr: &Multiaddr,
|
||||
) -> Result<THandler<Self>, ConnectionDenied> {
|
||||
let handler = match self {
|
||||
Either::Left(inner) => Either::Left(inner.handle_established_inbound_connection(
|
||||
_connection_id,
|
||||
connection_id,
|
||||
peer,
|
||||
local_addr,
|
||||
remote_addr,
|
||||
)?),
|
||||
Either::Right(inner) => Either::Right(inner.handle_established_inbound_connection(
|
||||
_connection_id,
|
||||
connection_id,
|
||||
peer,
|
||||
local_addr,
|
||||
remote_addr,
|
||||
@@ -73,23 +73,23 @@ where
|
||||
|
||||
fn handle_pending_outbound_connection(
|
||||
&mut self,
|
||||
_connection_id: ConnectionId,
|
||||
connection_id: ConnectionId,
|
||||
maybe_peer: Option<PeerId>,
|
||||
_addresses: &[Multiaddr],
|
||||
_effective_role: Endpoint,
|
||||
addresses: &[Multiaddr],
|
||||
effective_role: Endpoint,
|
||||
) -> Result<Vec<Multiaddr>, ConnectionDenied> {
|
||||
let addresses = match self {
|
||||
Either::Left(inner) => inner.handle_pending_outbound_connection(
|
||||
_connection_id,
|
||||
connection_id,
|
||||
maybe_peer,
|
||||
_addresses,
|
||||
_effective_role,
|
||||
addresses,
|
||||
effective_role,
|
||||
)?,
|
||||
Either::Right(inner) => inner.handle_pending_outbound_connection(
|
||||
_connection_id,
|
||||
connection_id,
|
||||
maybe_peer,
|
||||
_addresses,
|
||||
_effective_role,
|
||||
addresses,
|
||||
effective_role,
|
||||
)?,
|
||||
};
|
||||
|
||||
@@ -98,20 +98,20 @@ where
|
||||
|
||||
fn handle_established_outbound_connection(
|
||||
&mut self,
|
||||
_connection_id: ConnectionId,
|
||||
connection_id: ConnectionId,
|
||||
peer: PeerId,
|
||||
addr: &Multiaddr,
|
||||
role_override: Endpoint,
|
||||
) -> Result<THandler<Self>, ConnectionDenied> {
|
||||
let handler = match self {
|
||||
Either::Left(inner) => Either::Left(inner.handle_established_outbound_connection(
|
||||
_connection_id,
|
||||
connection_id,
|
||||
peer,
|
||||
addr,
|
||||
role_override,
|
||||
)?),
|
||||
Either::Right(inner) => Either::Right(inner.handle_established_outbound_connection(
|
||||
_connection_id,
|
||||
connection_id,
|
||||
peer,
|
||||
addr,
|
||||
role_override,
|
||||
|
Reference in New Issue
Block a user