summaryrefslogtreecommitdiff
path: root/cli/proc_state.rs
diff options
context:
space:
mode:
authorMaxim <59533214+biryukovmaxim@users.noreply.github.com>2022-02-11 22:04:31 +0300
committerGitHub <noreply@github.com>2022-02-11 14:04:31 -0500
commit65de5fb4658e92f0730901b8b083af375050bd64 (patch)
treef1b410613c31fcc6095e394ce59c10b447d01cab /cli/proc_state.rs
parent2fa0096821cd04334210fcae6f54f85d304dc17a (diff)
refactor: use `Arc` instead of making copies of `Flags` struct (#13610)
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r--cli/proc_state.rs4
1 files changed, 2 insertions, 2 deletions
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<Inner>);
pub struct Inner {
/// Flags parsed from `argv` contents.
- pub flags: flags::Flags,
+ pub flags: Arc<flags::Flags>,
pub dir: deno_dir::DenoDir,
pub coverage_dir: Option<String>,
pub file_fetcher: FileFetcher,
@@ -90,7 +90,7 @@ impl Deref for ProcState {
}
impl ProcState {
- pub async fn build(flags: flags::Flags) -> Result<Self, AnyError> {
+ pub async fn build(flags: Arc<flags::Flags>) -> Result<Self, AnyError> {
let maybe_custom_root = flags
.cache_path
.clone()