File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -211,9 +211,11 @@ impl ProtocolsHandler for GossipsubHandler {
211
211
212
212
fn inject_fully_negotiated_inbound (
213
213
& mut self ,
214
- ( substream , peer_kind ) : <Self :: InboundProtocol as InboundUpgrade < NegotiatedSubstream > >:: Output ,
214
+ protocol : <Self :: InboundProtocol as InboundUpgrade < NegotiatedSubstream > >:: Output ,
215
215
_info : Self :: InboundOpenInfo ,
216
216
) {
217
+ let ( substream, peer_kind) = protocol;
218
+
217
219
// If the peer doesn't support the protocol, reject all substreams
218
220
if self . protocol_unsupported {
219
221
return ;
@@ -233,9 +235,11 @@ impl ProtocolsHandler for GossipsubHandler {
233
235
234
236
fn inject_fully_negotiated_outbound (
235
237
& mut self ,
236
- ( substream , peer_kind ) : <Self :: OutboundProtocol as OutboundUpgrade < NegotiatedSubstream > >:: Output ,
238
+ protocol : <Self :: OutboundProtocol as OutboundUpgrade < NegotiatedSubstream > >:: Output ,
237
239
message : Self :: OutboundOpenInfo ,
238
240
) {
241
+ let ( substream, peer_kind) = protocol;
242
+
239
243
// If the peer doesn't support the protocol, reject all substreams
240
244
if self . protocol_unsupported {
241
245
return ;
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ pub fn build_query_response(
127
127
// Encode the addresses as TXT records, and multiple TXT records into a
128
128
// response packet.
129
129
for addr in addresses {
130
- let txt_to_send = format ! ( "dnsaddr={}/p2p/{}" , addr. to_string ( ) , peer_id. to_base58( ) ) ;
130
+ let txt_to_send = format ! ( "dnsaddr={}/p2p/{}" , addr, peer_id. to_base58( ) ) ;
131
131
let mut txt_record = Vec :: with_capacity ( txt_to_send. len ( ) ) ;
132
132
match append_txt_record ( & mut txt_record, & peer_name_bytes, ttl, & txt_to_send) {
133
133
Ok ( ( ) ) => {
You can’t perform that action at this time.
0 commit comments