@@ -191,11 +191,7 @@ impl HighlightingAssets {
191191 input: &mut OpenedInput,
192192 mapping: &SyntaxMapping,
193193 ) -> &SyntaxReference {
194− let syntax = if match input.kind {
195− OpenedInputKind::ThemePreviewFile => true,
196− _ => false,
197− } {
198− // FIXME: replace the above match statement with matches macro when min Rust >= 1.42.0
194+ let syntax = if input.kind.is_theme_preview_file() {
199195 self.syntax_set.find_syntax_by_name("Rust")
200196 } else if let Some(language) = language {
201197 self.syntax_set.find_syntax_by_token(language)