mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 00:47:16 +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]
|
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);
|
||||||
_ => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue