Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jun 25, 2019
1 parent 4a6914b commit e3619a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions clippy_lints/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
span: Span,
hir_id: hir::HirId,
) {
let is_impl = if let Some(hir::Node::Item(item)) = cx
.tcx
.hir()
.find(cx.tcx.hir().get_parent_node(hir_id))
{
let is_impl = if let Some(hir::Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
matches!(item.node, hir::ItemKind::Impl(_, _, _, _, Some(_), _, _))
} else {
false
Expand Down
6 changes: 1 addition & 5 deletions clippy_lints/src/needless_pass_by_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
}

// Exclude non-inherent impls
if let Some(Node::Item(item)) = cx
.tcx
.hir()
.find(cx.tcx.hir().get_parent_node(hir_id))
{
if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
ItemKind::Trait(..))
{
Expand Down
6 changes: 1 addition & 5 deletions clippy_lints/src/trivially_copy_pass_by_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TriviallyCopyPassByRef {
}

// Exclude non-inherent impls
if let Some(Node::Item(item)) = cx
.tcx
.hir()
.find(cx.tcx.hir().get_parent_node(hir_id))
{
if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
ItemKind::Trait(..))
{
Expand Down

0 comments on commit e3619a6

Please sign in to comment.