]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: silence rust warning 16251/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 9 Oct 2025 14:56:40 +0000 (16:56 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 9 Oct 2025 14:56:40 +0000 (16:56 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/rec-rust-lib/rust-preamble-in.rs

index d3758f6779cf5ce35aa23eb1266268b7ef977c35..73e960a98d020e14436aead22a27194cf76678b3 100644 (file)
@@ -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>;
 }