Skip to content

Commit 0b62b99

Browse files
committed
Minor
1 parent 422ac44 commit 0b62b99

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/ide/src/syntax_highlighting.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,7 @@ fn highlight_func_by_name_ref(
706706
sema: &Semantics<RootDatabase>,
707707
name_ref: &ast::NameRef,
708708
) -> Option<Highlight> {
709-
let parent = name_ref.syntax().parent()?;
710-
let method_call = ast::MethodCallExpr::cast(parent)?;
709+
let method_call = name_ref.syntax().parent().and_then(ast::MethodCallExpr::cast)?;
711710
highlight_method_call(sema, &method_call)
712711
}
713712

0 commit comments

Comments
 (0)