summaryrefslogtreecommitdiff
path: root/cli/lsp/testing
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-10-24 09:37:02 -0400
committerGitHub <noreply@github.com>2023-10-24 09:37:02 -0400
commit8f065a60e79e221a6ce7f6ce06c3022a85edb56a (patch)
treee1be8f4d384b5dd4f73940b86fd60cc58f43aef1 /cli/lsp/testing
parent9df36b33c6aa250daa200167eb0e1b9d6d738da1 (diff)
fix: improved using declaration support (#20959)
Upgrades to deno_ast 0.30.
Diffstat (limited to 'cli/lsp/testing')
-rw-r--r--cli/lsp/testing/collectors.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/lsp/testing/collectors.rs b/cli/lsp/testing/collectors.rs
index bc8eb65f1..e4538ab9d 100644
--- a/cli/lsp/testing/collectors.rs
+++ b/cli/lsp/testing/collectors.rs
@@ -479,12 +479,12 @@ impl Visit for TestCollector {
ns_prop_ident: &ast::Ident,
member_expr: &ast::MemberExpr,
) {
- if ns_prop_ident.sym.to_string() == "test" {
+ if ns_prop_ident.sym == "test" {
let ast::Expr::Ident(ident) = member_expr.obj.as_ref() else {
return;
};
- if ident.sym.to_string() != "Deno" {
+ if ident.sym != "Deno" {
return;
}
@@ -563,7 +563,7 @@ impl Visit for TestCollector {
match init.as_ref() {
// Identify destructured assignments of `test` from `Deno`
ast::Expr::Ident(ident) => {
- if ident.sym.to_string() != "Deno" {
+ if ident.sym != "Deno" {
continue;
}
@@ -584,7 +584,7 @@ impl Visit for TestCollector {
continue;
};
- if key_ident.sym.to_string() == "test" {
+ if key_ident.sym == "test" {
if let ast::Pat::Ident(value_ident) = &prop.value.as_ref() {
self.vars.insert(value_ident.id.sym.to_string());
}
@@ -600,7 +600,7 @@ impl Visit for TestCollector {
continue;
};
- if obj_ident.sym.to_string() != "Deno" {
+ if obj_ident.sym != "Deno" {
continue;
};
@@ -608,7 +608,7 @@ impl Visit for TestCollector {
continue;
};
- if prop_ident.sym.to_string() != "test" {
+ if prop_ident.sym != "test" {
continue;
}