Skip to content

Commit

Permalink
iface: make iterator chain a bit more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Nov 28, 2024
1 parent 2be5407 commit e9cf1c5
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/iface/interface/multicast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,8 @@ impl Interface {
.multicast
.groups
.keys()
.filter_map(|group_addr| match group_addr {
IpAddress::Ipv6(address)
if address.is_solicited_node_multicast()
&& !self.inner.has_solicited_node(*address) =>
{
Some(*group_addr)
}
_ => None,
})
.cloned()
.filter(|a| matches!(a, IpAddress::Ipv6(a) if a.is_solicited_node_multicast() && !self.inner.has_solicited_node(*a)))
.collect();
for removal in removals {
let _ = self.leave_multicast_group(removal);
Expand Down

0 comments on commit e9cf1c5

Please sign in to comment.