Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7539054

Browse files
committed
hir: Add non-optional hir_owner_nodes for real OwnerIds
1 parent c0f49a9 commit 7539054

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clippy_lints/src/min_ident_chars.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ impl Visitor<'_> for IdentVisitor<'_, '_> {
9393
// reimplement it even if we wanted to
9494
cx.tcx.opt_hir_node(hir_id)
9595
} else {
96-
let Some(owner) = cx.tcx.opt_hir_owner_nodes(hir_id.owner) else {
97-
return;
98-
};
96+
let owner = cx.tcx.hir_owner_nodes(hir_id.owner);
9997
owner.nodes.get(hir_id.local_id).copied().flatten().map(|p| p.node)
10098
};
10199
let Some(node) = node else {

0 commit comments

Comments
 (0)