From 65de5fb4658e92f0730901b8b083af375050bd64 Mon Sep 17 00:00:00 2001 From: Maxim <59533214+biryukovmaxim@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:04:31 +0300 Subject: refactor: use `Arc` instead of making copies of `Flags` struct (#13610) --- cli/proc_state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/proc_state.rs') diff --git a/cli/proc_state.rs b/cli/proc_state.rs index 5b347d169..12bdd3149 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -65,7 +65,7 @@ pub struct ProcState(Arc); pub struct Inner { /// Flags parsed from `argv` contents. - pub flags: flags::Flags, + pub flags: Arc, pub dir: deno_dir::DenoDir, pub coverage_dir: Option, pub file_fetcher: FileFetcher, @@ -90,7 +90,7 @@ impl Deref for ProcState { } impl ProcState { - pub async fn build(flags: flags::Flags) -> Result { + pub async fn build(flags: Arc) -> Result { let maybe_custom_root = flags .cache_path .clone() -- cgit v1.2.3