Address 'clippy::single-match' dogfood lint

This commit is contained in:
Wayne Warren 2018-11-21 06:05:52 -06:00
parent d4a6ee4a0c
commit 1fed72bad4

View file

@ -153,9 +153,8 @@ impl<'a, 'tcx> TriviallyCopyPassByRef {
trait_items: &[TraitItemRef] trait_items: &[TraitItemRef]
) { ) {
for item in trait_items { for item in trait_items {
match item.kind { if let AssociatedItemKind::Method{..} = item.kind {
AssociatedItemKind::Method{..} => self.check_trait_method(cx, item), self.check_trait_method(cx, item);
_ => (),
} }
} }
} }
@ -172,9 +171,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TriviallyCopyPassByRef {
if in_macro(item.span) { if in_macro(item.span) {
return; return;
} }
match item.node { if let ItemKind::Trait(_, _, _, _, ref trait_items) = item.node {
ItemKind::Trait(_, _, _, _, ref trait_items) => self.check_trait_items(cx, trait_items), self.check_trait_items(cx, trait_items);
_ => (),
} }
} }