fix clippy warnings

This commit is contained in:
vms 2020-07-09 14:52:02 +03:00
parent bee1983d97
commit d5d1207a3d
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ fn check_func(function_sig: &syn::Signature, function_vis: syn::Visibility) -> R
"FCE export function shouldn't use template parameters", "FCE export function shouldn't use template parameters",
)); ));
} }
if let Some(_) = variadic { if variadic.is_some() {
return Err(Error::new( return Err(Error::new(
variadic.span(), variadic.span(),
"FCE export function shouldn't use variadic interface", "FCE export function shouldn't use variadic interface",

View File

@ -29,7 +29,7 @@ const WASM_IMPORT_MODULE_DIRECTIVE_NAME: &str = "wasm_import_module";
impl ParseMacroInput for syn::ItemForeignMod { impl ParseMacroInput for syn::ItemForeignMod {
fn parse_macro_input(self) -> Result<FCEAst> { fn parse_macro_input(self) -> Result<FCEAst> {
match self.abi.name { 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")) return Err(Error::new(self.span(), "only 'C' abi is allowed"))
} }
_ => {} _ => {}