From: Fred Morcos Date: Tue, 12 Sep 2023 21:47:02 +0000 (+0200) Subject: Rec: Settings Rust bridge allow passing references to owned Vecs X-Git-Tag: rec-5.0.0-alpha1~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7aad94e66761ef46668e9818d2d79c1c3d45205;p=thirdparty%2Fpdns.git Rec: Settings Rust bridge allow passing references to owned Vecs --- 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) }