scip-syntax: uses .starts_with to check reference capture (#64081)

Sorry missed this during the review. No need to allow `rEfErEnCe` as the
capture name. Noticed this while checking the samply profile and seeing
string allocations (gets us back 20ms on spring-framework 🎉)

## Test plan

Covered by existing tests
This commit is contained in:
Christoph Hegemann 2024-07-25 15:05:12 +02:00 committed by GitHub
parent 1069817b5b
commit a4c7e9be9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -619,7 +619,7 @@ impl<'a> LocalResolver<'a> {
is_def_ref,
node: capture.node,
})
} else if capture_name.eq_ignore_ascii_case("reference") {
} else if capture_name.starts_with("reference") {
let offset = capture.node.start_byte();
if skip_references_at_offsets.contains(&offset) {