From: Otto Moerbeek Date: Thu, 9 Oct 2025 14:56:40 +0000 (+0200) Subject: rec: silence rust warning X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16251%2Fhead;p=thirdparty%2Fpdns.git rec: silence rust warning Signed-off-by: Otto Moerbeek --- diff --git a/pdns/recursordist/rec-rust-lib/rust-preamble-in.rs b/pdns/recursordist/rec-rust-lib/rust-preamble-in.rs index d3758f6779..73e960a98d 100644 --- a/pdns/recursordist/rec-rust-lib/rust-preamble-in.rs +++ b/pdns/recursordist/rec-rust-lib/rust-preamble-in.rs @@ -22,6 +22,9 @@ // This file (rust-preamble-in.rs) is included at the start of lib.rs +// rustc complains serde Serialize/Deserialize are not used on toplevel, while they *are* used plenty +// in mod recsettings. Disable the warning for the line below only. +#[allow(unused_imports)] use serde::{Deserialize, Serialize}; mod helpers; @@ -34,10 +37,6 @@ mod misc; mod web; // leaving this out causes link issues -// Suppresses "Deserialize unused" warning -#[derive(Deserialize, Serialize)] -struct UnusedStruct {} - trait Validate { fn validate(&self) -> Result<(), ValidationError>; }