mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 16:51:34 +00:00
*: Fix clippy warnings (#2227)
This commit is contained in:
@ -226,7 +226,7 @@ impl Mdns {
|
||||
|
||||
let mut addrs: Vec<Multiaddr> = Vec::new();
|
||||
for addr in peer.addresses() {
|
||||
if let Some(new_addr) = address_translation(&addr, &observed) {
|
||||
if let Some(new_addr) = address_translation(addr, &observed) {
|
||||
addrs.push(new_addr.clone())
|
||||
}
|
||||
addrs.push(addr.clone())
|
||||
|
@ -228,11 +228,11 @@ fn query_response_packet(id: u16, peer_id: &[u8], records: &[Vec<u8>], ttl: u32)
|
||||
|
||||
// Peer Id.
|
||||
append_u16(&mut out, peer_id.len() as u16);
|
||||
out.extend_from_slice(&peer_id);
|
||||
out.extend_from_slice(peer_id);
|
||||
|
||||
// The TXT records.
|
||||
for record in records {
|
||||
out.extend_from_slice(&record);
|
||||
out.extend_from_slice(record);
|
||||
}
|
||||
|
||||
out
|
||||
|
Reference in New Issue
Block a user