Skip to content

Commit e3619a6

Browse files
committed
fmt
1 parent 4a6914b commit e3619a6

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

clippy_lints/src/functions.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
107107
span: Span,
108108
hir_id: hir::HirId,
109109
) {
110-
let is_impl = if let Some(hir::Node::Item(item)) = cx
111-
.tcx
112-
.hir()
113-
.find(cx.tcx.hir().get_parent_node(hir_id))
114-
{
110+
let is_impl = if let Some(hir::Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
115111
matches!(item.node, hir::ItemKind::Impl(_, _, _, _, Some(_), _, _))
116112
} else {
117113
false

clippy_lints/src/needless_pass_by_value.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
8888
}
8989

9090
// Exclude non-inherent impls
91-
if let Some(Node::Item(item)) = cx
92-
.tcx
93-
.hir()
94-
.find(cx.tcx.hir().get_parent_node(hir_id))
95-
{
91+
if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
9692
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
9793
ItemKind::Trait(..))
9894
{

clippy_lints/src/trivially_copy_pass_by_ref.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TriviallyCopyPassByRef {
179179
}
180180

181181
// Exclude non-inherent impls
182-
if let Some(Node::Item(item)) = cx
183-
.tcx
184-
.hir()
185-
.find(cx.tcx.hir().get_parent_node(hir_id))
186-
{
182+
if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
187183
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
188184
ItemKind::Trait(..))
189185
{

0 commit comments

Comments
 (0)