Skip to content

Commit 3aa0e40

Browse files
Anatol LiuAnatol Liu
authored andcommitted
Add static semantic token modifier for associated functions with no &self
refactor logic into code_model.rs address comments
1 parent 14b38e1 commit 3aa0e40

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

crates/hir/src/code_model.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -802,11 +802,7 @@ impl Function {
802802
.and_then(|s| s.parent())
803803
.and_then(|s| Some(s.kind()));
804804

805-
match fn_parent_kind {
806-
Some(SyntaxKind::IMPL) => true,
807-
Some(SyntaxKind::TRAIT) => true,
808-
_ => false,
809-
}
805+
matches!(fn_parent_kind, Some(SyntaxKind::IMPL) | Some(SyntaxKind::TRAIT))
810806
}
811807
}
812808

0 commit comments

Comments
 (0)