From 4de22b97284c4a8aee53015d550c08b8f8083754 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 5 Jul 2024 13:23:42 +0200 Subject: [PATCH] api-macro: fix warnigns Signed-off-by: Wolfgang Bumiller --- proxmox-api-macro/src/api/mod.rs | 1 + proxmox-api-macro/src/util.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/proxmox-api-macro/src/api/mod.rs b/proxmox-api-macro/src/api/mod.rs index d55b7ca3..01bd5e20 100644 --- a/proxmox-api-macro/src/api/mod.rs +++ b/proxmox-api-macro/src/api/mod.rs @@ -443,6 +443,7 @@ pub enum OptionType { /// An updater type uses its "base" type's field's updaters to determine whether the field is /// supposed to be an option. + #[allow(dead_code)] Updater(Box), } diff --git a/proxmox-api-macro/src/util.rs b/proxmox-api-macro/src/util.rs index 428b1e4d..5f486e4b 100644 --- a/proxmox-api-macro/src/util.rs +++ b/proxmox-api-macro/src/util.rs @@ -392,15 +392,15 @@ impl Parse for JSONMapEntry { /// We get macro attributes like `#[doc = "TEXT"]` with the `=` included. pub struct BareAssignment { - pub token: Token![=], - pub content: T, + pub _token: Token![=], + pub _content: T, } impl Parse for BareAssignment { fn parse(input: ParseStream) -> syn::Result { Ok(Self { - token: input.parse()?, - content: input.parse()?, + _token: input.parse()?, + _content: input.parse()?, }) } }