From 72009de3097c6f2ac77e39b45d870dafe96fc2f0 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:51:45 +0100 Subject: [PATCH] chore: Fix warning from 1.77 rustc (#8265) /cc @maxbrunsfeld , I didn't remove the field outright since I'm not sure if the intent is to use it eventually in extensions work. This is the warning we're getting on 1.77 (release date: 03.21.2024) : ``` warning: field `0` is never read --> crates/language/src/language_registry.rs:81:12 | 81 | Loaded(PathBuf, tree_sitter::Language), | ------ ^^^^^^^ | | | field in this variant | = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 81 | Loaded((), tree_sitter::Language), | ~~ warning: field `0` is never read --> crates/language/src/language_registry.rs:82:13 | 82 | Loading(PathBuf, Vec>>), | ------- ^^^^^^^ | | | field in this variant | help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 82 | Loading((), Vec>>), | ~~ ``` Release Notes: - N/A --- crates/language/src/language_registry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/language/src/language_registry.rs b/crates/language/src/language_registry.rs index 0f968c050f..82cf26d41d 100644 --- a/crates/language/src/language_registry.rs +++ b/crates/language/src/language_registry.rs @@ -78,7 +78,7 @@ struct AvailableLanguage { enum AvailableGrammar { Native(tree_sitter::Language), - Loaded(PathBuf, tree_sitter::Language), + Loaded(#[allow(dead_code)] PathBuf, tree_sitter::Language), Loading(PathBuf, Vec>>), Unloaded(PathBuf), }