.cargo: Run clippy on ALL the source files (#2949)

This commit is contained in:
Thomas Eizinger
2022-10-04 18:24:38 +11:00
committed by GitHub
parent e6da99e4f8
commit 1b793242e6
50 changed files with 5497 additions and 5657 deletions

View File

@ -605,9 +605,8 @@ mod tests {
loop {
let swarm1_fut = swarm1.select_next_some();
pin_mut!(swarm1_fut);
match swarm1_fut.await {
SwarmEvent::NewListenAddr { address, .. } => return address,
_ => {}
if let SwarmEvent::NewListenAddr { address, .. } = swarm1_fut.await {
return address;
}
}
});
@ -681,9 +680,8 @@ mod tests {
loop {
let swarm1_fut = swarm1.select_next_some();
pin_mut!(swarm1_fut);
match swarm1_fut.await {
SwarmEvent::NewListenAddr { address, .. } => return address,
_ => {}
if let SwarmEvent::NewListenAddr { address, .. } = swarm1_fut.await {
return address;
}
}
});
@ -835,7 +833,7 @@ mod tests {
let addr_without_peer_id: Multiaddr = addr.clone();
let mut addr_with_other_peer_id = addr.clone();
addr.push(Protocol::P2p(peer_id.clone().into()));
addr.push(Protocol::P2p(peer_id.into()));
addr_with_other_peer_id.push(Protocol::P2p(other_peer_id.into()));
assert!(multiaddr_matches_peer_id(&addr, &peer_id));