api-macro: fix warnigns

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-07-05 13:23:42 +02:00
parent cff04a4502
commit 4de22b9728
2 changed files with 5 additions and 4 deletions

View File

@ -443,6 +443,7 @@ pub enum OptionType {
/// An updater type uses its "base" type's field's updaters to determine whether the field is /// An updater type uses its "base" type's field's updaters to determine whether the field is
/// supposed to be an option. /// supposed to be an option.
#[allow(dead_code)]
Updater(Box<syn::Type>), Updater(Box<syn::Type>),
} }

View File

@ -392,15 +392,15 @@ impl Parse for JSONMapEntry {
/// We get macro attributes like `#[doc = "TEXT"]` with the `=` included. /// We get macro attributes like `#[doc = "TEXT"]` with the `=` included.
pub struct BareAssignment<T: Parse> { pub struct BareAssignment<T: Parse> {
pub token: Token![=], pub _token: Token![=],
pub content: T, pub _content: T,
} }
impl<T: Parse> Parse for BareAssignment<T> { impl<T: Parse> Parse for BareAssignment<T> {
fn parse(input: ParseStream) -> syn::Result<Self> { fn parse(input: ParseStream) -> syn::Result<Self> {
Ok(Self { Ok(Self {
token: input.parse()?, _token: input.parse()?,
content: input.parse()?, _content: input.parse()?,
}) })
} }
} }