mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 09:31:20 +00:00
*: Fix clippy warnings (#2227)
This commit is contained in:
@ -296,7 +296,7 @@ impl NetworkBehaviour for Relay {
|
||||
.push_back(NetworkBehaviourAction::NotifyHandler {
|
||||
peer_id: *peer_id,
|
||||
handler: NotifyHandler::Any,
|
||||
event: event,
|
||||
event,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -640,7 +640,7 @@ impl NetworkBehaviour for Relay {
|
||||
dst_peer_id,
|
||||
send_back,
|
||||
})) => {
|
||||
if let Some(_) = self.connected_peers.get(&relay_peer_id) {
|
||||
if self.connected_peers.get(&relay_peer_id).is_some() {
|
||||
// In case we are already listening via the relay,
|
||||
// prefer the primary connection.
|
||||
let handler = self
|
||||
|
@ -50,10 +50,7 @@ pub struct IncomingDstReq {
|
||||
impl IncomingDstReq {
|
||||
/// Creates a `IncomingDstReq`.
|
||||
pub(crate) fn new(stream: Framed<NegotiatedSubstream, UviBytes>, src: Peer) -> Self {
|
||||
IncomingDstReq {
|
||||
stream: stream,
|
||||
src,
|
||||
}
|
||||
IncomingDstReq { stream, src }
|
||||
}
|
||||
|
||||
/// Returns the peer id of the source that is being relayed.
|
||||
|
Reference in New Issue
Block a user