mirror of
https://github.com/denoland/deno.git
synced 2025-01-08 07:08:27 -05:00
refactor: simplify to string calls (#18011)
This commit is contained in:
parent
f763f2e298
commit
7ec260dddf
3 changed files with 3 additions and 3 deletions
|
@ -988,7 +988,7 @@ impl ModuleRegistry {
|
||||||
.origins
|
.origins
|
||||||
.keys()
|
.keys()
|
||||||
.filter_map(|k| {
|
.filter_map(|k| {
|
||||||
let mut origin = k.as_str().to_string();
|
let mut origin = k.to_string();
|
||||||
if origin.ends_with('/') {
|
if origin.ends_with('/') {
|
||||||
origin.pop();
|
origin.pop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -832,7 +832,7 @@ fn extract_files_from_source_comments(
|
||||||
media_type: MediaType,
|
media_type: MediaType,
|
||||||
) -> Result<Vec<File>, AnyError> {
|
) -> Result<Vec<File>, AnyError> {
|
||||||
let parsed_source = deno_ast::parse_module(deno_ast::ParseParams {
|
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),
|
text_info: deno_ast::SourceTextInfo::new(source),
|
||||||
media_type,
|
media_type,
|
||||||
capture_tokens: false,
|
capture_tokens: false,
|
||||||
|
|
|
@ -291,7 +291,7 @@ fn throw_invalid_package_target(
|
||||||
subpath,
|
subpath,
|
||||||
target,
|
target,
|
||||||
internal,
|
internal,
|
||||||
Some(referrer.as_str().to_string()),
|
Some(referrer.to_string()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue