diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-01-25 19:34:49 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-01-30 15:00:52 +0300 |
| commit | 7539054b565f7a21355f16f85b9722fadcd28c4c (patch) | |
| tree | e059500f192e0ce73e390f0d9692a612d88a3ac3 | |
| parent | c0f49a9995d82163cbd6282a3dd38b990e71ccce (diff) | |
hir: Add non-optional `hir_owner_nodes` for real `OwnerId`s
| -rw-r--r-- | clippy_lints/src/min_ident_chars.rs | 4 |
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 { |
