MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / dedup_deny_rules

Function dedup_deny_rules

crates/openshell-policy/src/merge.rs:859–867  ·  view source on GitHub ↗
(values: &mut Vec<L7DenyRule>)

Source from the content-addressed store, hash-verified

857}
858
859fn dedup_deny_rules(values: &mut Vec<L7DenyRule>) {
860 let mut deduped = Vec::with_capacity(values.len());
861 for value in std::mem::take(values) {
862 if !deduped.contains(&value) {
863 deduped.push(value);
864 }
865 }
866 *values = deduped;
867}
868
869fn remove_endpoint(policy: &mut SandboxPolicy, rule_name: Option<&str>, host: &str, port: u32) {
870 let target_keys: Vec<String> = if let Some(rule_name) = rule_name {

Callers 1

normalize_endpointFunction · 0.85

Calls 2

lenMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected