From 8f065a60e79e221a6ce7f6ce06c3022a85edb56a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 24 Oct 2023 09:37:02 -0400 Subject: fix: improved using declaration support (#20959) Upgrades to deno_ast 0.30. --- cli/lsp/testing/collectors.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cli/lsp/testing') 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; } -- cgit v1.2.3