From fe40e242cf4164a2f7909fa59745eb6c8773bc81 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Fri, 1 Nov 2024 11:40:55 -0700 Subject: [PATCH] clippy --- src/bindgen/ir/function.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bindgen/ir/function.rs b/src/bindgen/ir/function.rs index 09b9e837..96cd6d8e 100644 --- a/src/bindgen/ir/function.rs +++ b/src/bindgen/ir/function.rs @@ -49,10 +49,9 @@ impl Function { attrs: &[syn::Attribute], mod_cfg: Option<&Cfg>, ) -> Result { - if let Ok(GenericParams(generics)) = GenericParams::load(&sig.generics) { - if !generics.is_empty() { - return Err("Generic functions are not supported".to_owned()); - } + let GenericParams(generics) = GenericParams::load(&sig.generics)?; + if !generics.is_empty() { + return Err("Generic functions are not supported".to_owned()); } let mut args = sig.inputs.iter().try_skip_map(|x| x.as_argument())?;