mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Address 'clippy::single-match' dogfood lint
This commit is contained in:
parent
d4a6ee4a0c
commit
1fed72bad4
1 changed files with 4 additions and 6 deletions
|
@ -153,9 +153,8 @@ impl<'a, 'tcx> TriviallyCopyPassByRef {
|
|||
trait_items: &[TraitItemRef]
|
||||
) {
|
||||
for item in trait_items {
|
||||
match item.kind {
|
||||
AssociatedItemKind::Method{..} => self.check_trait_method(cx, item),
|
||||
_ => (),
|
||||
if let AssociatedItemKind::Method{..} = item.kind {
|
||||
self.check_trait_method(cx, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,9 +171,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TriviallyCopyPassByRef {
|
|||
if in_macro(item.span) {
|
||||
return;
|
||||
}
|
||||
match item.node {
|
||||
ItemKind::Trait(_, _, _, _, ref trait_items) => self.check_trait_items(cx, trait_items),
|
||||
_ => (),
|
||||
if let ItemKind::Trait(_, _, _, _, ref trait_items) = item.node {
|
||||
self.check_trait_items(cx, trait_items);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue