Implement matches! macro (#1777)

Fix #1775
This commit is contained in:
Herman Junge
2020-10-15 21:42:43 +00:00
parent 97be2ca295
commit d7b9d0dd9f
8 changed files with 19 additions and 62 deletions

View File

@@ -519,10 +519,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
let mut out_list = enr.multiaddr();
out_list.retain(|addr| {
addr.iter()
.find(|v| match v {
MProtocol::Udp(_) => true,
_ => false,
})
.find(|v| matches!(v, MProtocol::Udp(_)))
.is_none()
});