Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
scovich committed Nov 1, 2024
1 parent 4b02982 commit fe40e24
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/bindgen/ir/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ impl Function {
attrs: &[syn::Attribute],
mod_cfg: Option<&Cfg>,
) -> Result<Function, String> {
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())?;
Expand Down

0 comments on commit fe40e24

Please sign in to comment.