chore(rust): make Query extra predicates state fully immutable
This commit is contained in:
parent
74e77b10c1
commit
52f7eaff31
6 changed files with 96 additions and 78 deletions
|
|
@ -828,8 +828,8 @@ impl<'a> LanguageConfiguration<'a> {
|
|||
let mut all_highlight_names = self.highlight_names.lock().unwrap();
|
||||
if self.use_all_highlight_names {
|
||||
for capture_name in result.query.capture_names() {
|
||||
if !all_highlight_names.contains(capture_name) {
|
||||
all_highlight_names.push(capture_name.clone());
|
||||
if !all_highlight_names.iter().any(|x| x == capture_name) {
|
||||
all_highlight_names.push(capture_name.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue