Skip to content

Commit b5199be

Browse files
committed
clippy
1 parent 6866d0d commit b5199be

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

packages/yew-macro/src/autoprops.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,13 @@ impl syn::parse::Parse for Autoprops {
6464
})?;
6565

6666
for input in &sig.inputs {
67-
match input {
68-
syn::FnArg::Typed(syn::PatType { pat, .. }) => match pat.as_ref() {
69-
syn::Pat::Wild(wild) => {
70-
return Err(syn::Error::new_spanned(
71-
wild,
72-
"cannot use `_` as field name",
73-
));
74-
}
75-
_ => {}
76-
},
77-
_ => {}
67+
if let syn::FnArg::Typed(syn::PatType { pat, .. }) = input {
68+
if let syn::Pat::Wild(wild) = pat.as_ref() {
69+
return Err(syn::Error::new_spanned(
70+
wild,
71+
"cannot use `_` as field name",
72+
));
73+
}
7874
}
7975
}
8076

0 commit comments

Comments
 (0)