diff options
author | Geert-Jan Zwiers <geertjanzwiers@protonmail.com> | 2023-03-04 13:05:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 08:05:07 -0400 |
commit | 58ec963bf190cd33cdbc3218be3b8c61189bdcfd (patch) | |
tree | ffaa21e1707bb79e5822783bab941f5bbaa006fe /cli | |
parent | 399a22db887db60f90ad1182172dc218e0e1d5ec (diff) |
refactor: simplify to string calls (#18011)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/lsp/registries.rs | 2 | ||||
-rw-r--r-- | cli/tools/test.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs index d67068ec7..fb60c7626 100644 --- a/cli/lsp/registries.rs +++ b/cli/lsp/registries.rs @@ -988,7 +988,7 @@ impl ModuleRegistry { .origins .keys() .filter_map(|k| { - let mut origin = k.as_str().to_string(); + let mut origin = k.to_string(); if origin.ends_with('/') { origin.pop(); } diff --git a/cli/tools/test.rs b/cli/tools/test.rs index d0f3013b3..ae831b95b 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -832,7 +832,7 @@ fn extract_files_from_source_comments( media_type: MediaType, ) -> Result<Vec<File>, AnyError> { let parsed_source = deno_ast::parse_module(deno_ast::ParseParams { - specifier: specifier.as_str().to_string(), + specifier: specifier.to_string(), text_info: deno_ast::SourceTextInfo::new(source), media_type, capture_tokens: false, |