From a284f50732259c84cfb13216fecd979cfc957e1a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 4 Feb 2024 00:11:12 -0500 Subject: [PATCH] perf: remove duplicate `env::current_dir` call in package.json search (#22255) Micro-optimization. --- cli/args/flags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index aa59eb36aa8c94..824b73264f16ff 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -744,7 +744,7 @@ impl Flags { .to_owned(); Some(p) } else if module_specifier.scheme() == "npm" { - Some(std::env::current_dir().unwrap()) + Some(current_dir.to_path_buf()) } else { None }