From a7aad94e66761ef46668e9818d2d79c1c3d45205 Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Tue, 12 Sep 2023 23:47:02 +0200 Subject: [PATCH] Rec: Settings Rust bridge allow passing references to owned Vecs --- pdns/recursordist/settings/rust/src/bridge.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdns/recursordist/settings/rust/src/bridge.rs b/pdns/recursordist/settings/rust/src/bridge.rs index 80d1589e51..370a881074 100644 --- a/pdns/recursordist/settings/rust/src/bridge.rs +++ b/pdns/recursordist/settings/rust/src/bridge.rs @@ -210,10 +210,12 @@ impl AuthZone { } } +#[allow(clippy::ptr_arg)] //# Avoids creating a rust::Slice object on the C++ side. pub fn validate_auth_zones(field: &str, vec: &Vec) -> Result<(), ValidationError> { validate_vec(field, vec, |field, element| element.validate(field)) } +#[allow(clippy::ptr_arg)] //# Avoids creating a rust::Slice object on the C++ side. pub fn validate_forward_zones( field: &str, vec: &Vec, @@ -270,6 +272,7 @@ pub fn allow_from_to_yaml_string_incoming( serde_yaml::to_string(&outerval) } +#[allow(clippy::ptr_arg)] //# Avoids creating a rust::Slice object on the C++ side. pub fn validate_allow_from(field: &str, vec: &Vec) -> Result<(), ValidationError> { validate_vec(field, vec, validate_subnet) } @@ -280,10 +283,12 @@ pub fn allow_for_to_yaml_string(vec: &Vec) -> Result) -> Result<(), ValidationError> { validate_vec(field, vec, validate_name) } +#[allow(clippy::ptr_arg)] //# Avoids creating a rust::Slice object on the C++ side. pub fn validate_allow_notify_for(field: &str, vec: &Vec) -> Result<(), ValidationError> { validate_vec(field, vec, validate_name) } -- 2.47.2