@@ -66,10 +66,10 @@ impl LanguageConfiguration {
6666 language,
6767 &highlights_query,
6868 &injections_query,
69− &locals_query,
69+ locals_query,
7070 )
7171 .unwrap(); // TODO: no unwrap
72− config.configure(&scopes);
72+ config.configure(scopes);
7373 Some(Arc::new(config))
7474 }
7575 })
@@ -90,8 +90,8 @@ pub struct Loader {
9090}
9191
9292impl Loader {
93− fn init() -> Loader {
94− let mut loader = Loader {
93+ fn init() -> Self {
94+ let mut loader = Self {
9595 language_configs: Vec::new(),
9696 language_config_ids_by_file_type: HashMap::new(),
9797 };
@@ -331,7 +331,7 @@ impl Syntax {
331331
332332 let mut result = HighlightIter {
333333 source,
334− byte_offset: range.map(|r| r.start).unwrap_or(0), // TODO: simplify
334+ byte_offset: range.map_or(0, |r| r.start), // TODO: simplify
335335 injection_callback,
336336 cancellation_flag,
337337 iter_count: 0,
@@ -1019,12 +1019,12 @@ impl<'a> HighlightIterLayer<'a> {
10191019
10201020 if queue.is_empty() {
10211021 break;
1022− } else {
1023− let (next_config, next_depth, next_ranges) = queue.remove(0);
1024− config = next_config;
1025− depth = next_depth;
1026− ranges = next_ranges;
10271022 }
1023+
1024+ let (next_config, next_depth, next_ranges) = queue.remove(0);
1025+ config = next_config;
1026+ depth = next_depth;
1027+ ranges = next_ranges;
10281028 }
10291029
10301030 Ok(result)
@@ -1292,7 +1292,7 @@ where
12921292 // If this capture represents an injection, then process the injection.
12931293 if match_.pattern_index < layer.config.locals_pattern_index {
12941294 let (language_name, content_node, include_children) =
1295− injection_for_match(&layer.config, &layer.config.query, &match_, self.source);
1295+ injection_for_match(layer.config, &layer.config.query, &match_, self.source);
12961296
12971297 // Explicitly remove this match so that none of its other captures will remain
12981298 // in the stream of captures.