Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions config/src/external/overlay/vpcpeering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl VpcExpose {
}
#[must_use]
pub fn has_host_prefixes(&self) -> bool {
self.ips.iter().filter(|p| p.prefix().is_host()).count() > 0
self.ips.iter().any(|p| p.prefix().is_host())
}

/// The prefixes of an expose to be advertised to a remote peer
Expand Down Expand Up @@ -503,11 +503,7 @@ impl VpcManifest {
}
#[must_use]
pub fn has_host_prefixes(&self) -> bool {
self.exposes
.iter()
.filter(|expose| expose.has_host_prefixes())
.count()
> 0
self.exposes.iter().any(|expose| expose.has_host_prefixes())
}
fn validate_expose_collisions(&self) -> ConfigResult {
// Check that prefixes in each expose don't overlap with prefixes in other exposes
Expand Down
Loading
Loading