diff --git a/crates/wit/src/parse_macro_input/item_fn.rs b/crates/wit/src/parse_macro_input/item_fn.rs index 57b94d6..002e913 100644 --- a/crates/wit/src/parse_macro_input/item_fn.rs +++ b/crates/wit/src/parse_macro_input/item_fn.rs @@ -95,7 +95,7 @@ fn check_func(function_sig: &syn::Signature, function_vis: syn::Visibility) -> R "FCE export function shouldn't use template parameters", )); } - if let Some(_) = variadic { + if variadic.is_some() { return Err(Error::new( variadic.span(), "FCE export function shouldn't use variadic interface", diff --git a/crates/wit/src/parse_macro_input/item_foreign_mod.rs b/crates/wit/src/parse_macro_input/item_foreign_mod.rs index f8a8407..378cef0 100644 --- a/crates/wit/src/parse_macro_input/item_foreign_mod.rs +++ b/crates/wit/src/parse_macro_input/item_foreign_mod.rs @@ -29,7 +29,7 @@ const WASM_IMPORT_MODULE_DIRECTIVE_NAME: &str = "wasm_import_module"; impl ParseMacroInput for syn::ItemForeignMod { fn parse_macro_input(self) -> Result { match self.abi.name { - Some(ref name) if name.value() != "C".to_string() => { + Some(ref name) if name.value() != "C" => { return Err(Error::new(self.span(), "only 'C' abi is allowed")) } _ => {}