From 50dd0c2d0d286bb17f6baa3d20eb9951f33fc6b8 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Thu, 9 Oct 2025 16:56:40 +0200 Subject: [PATCH] rec: silence rust warning Signed-off-by: Otto Moerbeek --- pdns/recursordist/rec-rust-lib/rust-preamble-in.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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>; } -- 2.47.3