diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-23 23:27:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-23 23:27:58 +0100 |
| commit | 275dee60e71225a9c6c4b3b4ea7ffe4c6ecb4d87 (patch) | |
| tree | 13ed3ab7e825a81085e8dcc5efeee417416b86cf /cli/worker.rs | |
| parent | edab8f2fd48efddc19eb0032955fee4b5dbf76e6 (diff) | |
refactor: make version and user_agent &'static str (#18400)
These caused a bunch of unnecessary allocations on each startup.
Diffstat (limited to 'cli/worker.rs')
| -rw-r--r-- | cli/worker.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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, |
