protocols/: Fix clippy and fmt warnings (#2433)

* protocols/mdns: fix clippy::to-string-in-format-args

* protocols/gossipsub: fix rustfmt error
This commit is contained in:
Elena Frank
2022-01-13 19:35:20 +01:00
committed by GitHub
parent 74f31f1266
commit ddc035170d
2 changed files with 7 additions and 3 deletions

View File

@ -211,9 +211,11 @@ impl ProtocolsHandler for GossipsubHandler {
fn inject_fully_negotiated_inbound(
&mut self,
(substream, peer_kind): <Self::InboundProtocol as InboundUpgrade<NegotiatedSubstream>>::Output,
protocol: <Self::InboundProtocol as InboundUpgrade<NegotiatedSubstream>>::Output,
_info: Self::InboundOpenInfo,
) {
let (substream, peer_kind) = protocol;
// If the peer doesn't support the protocol, reject all substreams
if self.protocol_unsupported {
return;
@ -233,9 +235,11 @@ impl ProtocolsHandler for GossipsubHandler {
fn inject_fully_negotiated_outbound(
&mut self,
(substream, peer_kind): <Self::OutboundProtocol as OutboundUpgrade<NegotiatedSubstream>>::Output,
protocol: <Self::OutboundProtocol as OutboundUpgrade<NegotiatedSubstream>>::Output,
message: Self::OutboundOpenInfo,
) {
let (substream, peer_kind) = protocol;
// If the peer doesn't support the protocol, reject all substreams
if self.protocol_unsupported {
return;