Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
| -rw-r--r-- | crates/hir_expand/src/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 5e49d3f6af..b455fd5917 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs @@ -636,10 +636,7 @@ impl<'a> InFile<&'a SyntaxNode> { ) -> impl Iterator<Item = InFile<SyntaxNode>> + Clone + '_ { iter::successors(Some(self.cloned()), move |node| match node.value.parent() { Some(parent) => Some(node.with_value(parent)), - None => { - let parent_node = node.file_id.call_node(db)?; - Some(parent_node) - } + None => node.file_id.call_node(db), }) } |