From 275dee60e71225a9c6c4b3b4ea7ffe4c6ecb4d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 23 Mar 2023 23:27:58 +0100 Subject: refactor: make version and user_agent &'static str (#18400) These caused a bunch of unnecessary allocations on each startup. --- cli/worker.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/worker.rs') diff --git a/cli/worker.rs b/cli/worker.rs index a0168a1f3..23dd63119 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -517,10 +517,10 @@ async fn create_main_worker_internal( location: ps.options.location_flag().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, @@ -685,10 +685,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, -- cgit v1.2.3