about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2024-01-25 19:34:49 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2024-01-30 15:00:52 +0300
commit7539054b565f7a21355f16f85b9722fadcd28c4c (patch)
treee059500f192e0ce73e390f0d9692a612d88a3ac3
parentc0f49a9995d82163cbd6282a3dd38b990e71ccce (diff)
hir: Add non-optional `hir_owner_nodes` for real `OwnerId`s
-rw-r--r--clippy_lints/src/min_ident_chars.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/clippy_lints/src/min_ident_chars.rs b/clippy_lints/src/min_ident_chars.rs
index 2b0063f62d9..41168230752 100644
--- a/clippy_lints/src/min_ident_chars.rs
+++ b/clippy_lints/src/min_ident_chars.rs
@@ -93,9 +93,7 @@ impl Visitor<'_> for IdentVisitor<'_, '_> {
             // reimplement it even if we wanted to
             cx.tcx.opt_hir_node(hir_id)
         } else {
-            let Some(owner) = cx.tcx.opt_hir_owner_nodes(hir_id.owner) else {
-                return;
-            };
+            let owner = cx.tcx.hir_owner_nodes(hir_id.owner);
             owner.nodes.get(hir_id.local_id).copied().flatten().map(|p| p.node)
         };
         let Some(node) = node else {