From 9efed4c7a3d32de62e9c9b5e0c6712ce97637abb Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 1 May 2023 14:35:23 -0400 Subject: refactor(cli): remove ProcState - add CliFactory (#18900) This removes `ProcState` and replaces it with a new `CliFactory` which initializes our "service structs" on demand. This isn't a performance improvement at the moment for `deno run`, but might unlock performance improvements in the future. --- cli/args/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/args') diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 4038fb099..00476dce1 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -753,7 +753,7 @@ impl CliOptions { return Ok(Some(state.snapshot.clone().into_valid()?)); } - if let Some(lockfile) = self.maybe_lock_file() { + if let Some(lockfile) = self.maybe_lockfile() { if !lockfile.lock().overwrite { return Ok(Some( snapshot_from_lockfile(lockfile.clone(), api) @@ -827,7 +827,7 @@ impl CliOptions { .map(|host| InspectorServer::new(host, version::get_user_agent())) } - pub fn maybe_lock_file(&self) -> Option>> { + pub fn maybe_lockfile(&self) -> Option>> { self.maybe_lockfile.clone() } -- cgit v1.2.3