use matches!() macro in more places
This commit is contained in:
parent
c34c015fe2
commit
d12a358673
34 changed files with 138 additions and 270 deletions
|
@ -256,10 +256,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
|
|||
// we're just not interested in this item.
|
||||
//
|
||||
// If we find one, try to locate a `#[proc_macro_derive]` attribute on it.
|
||||
let is_fn = match item.kind {
|
||||
ast::ItemKind::Fn(..) => true,
|
||||
_ => false,
|
||||
};
|
||||
let is_fn = matches!(item.kind, ast::ItemKind::Fn(..));
|
||||
|
||||
let mut found_attr: Option<&'a ast::Attribute> = None;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue