summaryrefslogtreecommitdiff
path: root/cli/lsp/documents.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-10-04 23:05:12 -0400
committerGitHub <noreply@github.com>2023-10-04 23:05:12 -0400
commit1ff525e25b6ca833893c03f720a1298adffb37db (patch)
treed4e1cff2a413a5355037d4f9664f7a747e98ab57 /cli/lsp/documents.rs
parent64f9155126b1cd14a46de58ae1654045cfacd150 (diff)
refactor(node): combine node resolution code for resolving a package subpath from external code (#20791)
We had two methods that did the same functionality.
Diffstat (limited to 'cli/lsp/documents.rs')
-rw-r--r--cli/lsp/documents.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs
index 92c2e0a3b..3a0a2ed9f 100644
--- a/cli/lsp/documents.rs
+++ b/cli/lsp/documents.rs
@@ -47,7 +47,6 @@ use indexmap::IndexMap;
use lsp::Url;
use once_cell::sync::Lazy;
use package_json::PackageJsonDepsProvider;
-use std::collections::BTreeMap;
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::VecDeque;
@@ -1267,8 +1266,8 @@ impl Documents {
if let Some(package_json_deps) = &maybe_package_json_deps {
// We need to ensure the hashing is deterministic so explicitly type
// this in order to catch if the type of package_json_deps ever changes
- // from a sorted/deterministic BTreeMap to something else.
- let package_json_deps: &BTreeMap<_, _> = *package_json_deps;
+ // from a sorted/deterministic IndexMap to something else.
+ let package_json_deps: &IndexMap<_, _> = *package_json_deps;
for (key, value) in package_json_deps {
hasher.write_hashable(key);
match value {