diff options
author | 林炳权 <695601626@qq.com> | 2024-01-02 06:22:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-01 23:22:48 +0100 |
commit | 96b581bdd2bedb31aa51c0a992686f27ed1a1f10 (patch) | |
tree | 3e141ed70531ff37f93eb25d4ae135b97f14b7a1 /cli/lsp/config.rs | |
parent | 7e72f3af6152d4b62c2ea94d025dfa297a6b0cb4 (diff) |
chore: update to Rust 1.75 (#21731)
Diffstat (limited to 'cli/lsp/config.rs')
-rw-r--r-- | cli/lsp/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index b618495bd..e7839de3b 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -932,7 +932,7 @@ impl Config { } pub fn root_uri(&self) -> Option<&Url> { - self.workspace_folders.get(0).map(|p| &p.0) + self.workspace_folders.first().map(|p| &p.0) } pub fn maybe_node_modules_dir_path(&self) -> Option<&PathBuf> { @@ -1184,7 +1184,7 @@ fn specifier_enabled( return true; }; let (settings, mut folder_uri) = settings.get_for_specifier(specifier); - folder_uri = folder_uri.or_else(|| workspace_folders.get(0).map(|f| &f.0)); + folder_uri = folder_uri.or_else(|| workspace_folders.first().map(|f| &f.0)); let mut disable_paths = vec![]; let mut enable_paths = None; if let Some(folder_uri) = folder_uri { |