(
existing_rule: &NetworkPolicyRule,
incoming_rule: &NetworkPolicyRule,
)
| 593 | } |
| 594 | |
| 595 | fn rules_share_endpoint( |
| 596 | existing_rule: &NetworkPolicyRule, |
| 597 | incoming_rule: &NetworkPolicyRule, |
| 598 | ) -> bool { |
| 599 | incoming_rule.endpoints.iter().any(|incoming_endpoint| { |
| 600 | existing_rule |
| 601 | .endpoints |
| 602 | .iter() |
| 603 | .any(|existing_endpoint| endpoints_overlap(existing_endpoint, incoming_endpoint)) |
| 604 | }) |
| 605 | } |
| 606 | |
| 607 | fn endpoints_overlap(left: &NetworkEndpoint, right: &NetworkEndpoint) -> bool { |
| 608 | if !left.host.eq_ignore_ascii_case(&right.host) { |
no test coverage detected