summaryrefslogtreecommitdiff
path: root/cli/standalone.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-23 23:27:58 +0100
committerGitHub <noreply@github.com>2023-03-23 23:27:58 +0100
commit275dee60e71225a9c6c4b3b4ea7ffe4c6ecb4d87 (patch)
tree13ed3ab7e825a81085e8dcc5efeee417416b86cf /cli/standalone.rs
parentedab8f2fd48efddc19eb0032955fee4b5dbf76e6 (diff)
refactor: make version and user_agent &'static str (#18400)
These caused a bunch of unnecessary allocations on each startup.
Diffstat (limited to 'cli/standalone.rs')
-rw-r--r--cli/standalone.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/standalone.rs b/cli/standalone.rs
index 254cb9de5..527e8d975 100644
--- a/cli/standalone.rs
+++ b/cli/standalone.rs
@@ -258,10 +258,10 @@ fn create_web_worker_callback(
location: Some(args.main_module.clone()),
no_color: !colors::use_color(),
is_tty: colors::is_tty(),
- runtime_version: version::deno(),
+ runtime_version: version::deno().to_string(),
ts_version: version::TYPESCRIPT.to_string(),
unstable: ps.options.unstable(),
- user_agent: version::get_user_agent(),
+ user_agent: version::get_user_agent().to_string(),
inspect: ps.options.is_inspecting(),
},
extensions: ops::cli_exts(ps.clone()),
@@ -347,10 +347,10 @@ pub async fn run(
location: metadata.location,
no_color: !colors::use_color(),
is_tty: colors::is_tty(),
- runtime_version: version::deno(),
+ runtime_version: version::deno().to_string(),
ts_version: version::TYPESCRIPT.to_string(),
unstable: metadata.unstable,
- user_agent: version::get_user_agent(),
+ user_agent: version::get_user_agent().to_string(),
inspect: ps.options.is_inspecting(),
},
extensions: ops::cli_exts(ps.clone()),