From 7ed90a20d04982ae15a52ae2378cbffd4b6839df Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 5 Jun 2024 11:04:16 -0400 Subject: fix: better handling of npm resolution occurring on workers (#24094) Closes https://github.com/denoland/deno/issues/24063 --- cli/tools/bench/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tools/bench') diff --git a/cli/tools/bench/mod.rs b/cli/tools/bench/mod.rs index dd94205cb..a6c8d3e16 100644 --- a/cli/tools/bench/mod.rs +++ b/cli/tools/bench/mod.rs @@ -506,14 +506,14 @@ pub async fn run_benchmarks_with_watch( let bench_modules_to_reload = if let Some(changed_paths) = changed_paths { let changed_paths = changed_paths.into_iter().collect::>(); - let mut result = Vec::new(); + let mut result = IndexSet::with_capacity(bench_modules.len()); for bench_module_specifier in bench_modules { if has_graph_root_local_dependent_changed( &graph, bench_module_specifier, &changed_paths, ) { - result.push(bench_module_specifier.clone()); + result.insert(bench_module_specifier.clone()); } } result -- cgit v1.2.3