summaryrefslogtreecommitdiff
path: root/cli/ops/testing.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-03-17 16:15:27 -0600
committerGitHub <noreply@github.com>2023-03-17 22:15:27 +0000
commit3487fde236d0852a8b0672c293fa41a741f471e8 (patch)
treeaf466368147a08b787080446319a3a46a60ee37d /cli/ops/testing.rs
parente55b448730160a6e4df9815a268d4049ac89deab (diff)
perf(core) Reduce copying and cloning in extension initialization (#18252)
Follow-up to #18210: * we are passing the generated `cfg` object into the state function rather than passing individual config fields * reduce cloning dramatically by making the state_fn `FnOnce` * `take` for `ExtensionBuilder` to avoid more unnecessary copies * renamed `config` to `options`
Diffstat (limited to 'cli/ops/testing.rs')
-rw-r--r--cli/ops/testing.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/ops/testing.rs b/cli/ops/testing.rs
index f32e96147..0849f1c7a 100644
--- a/cli/ops/testing.rs
+++ b/cli/ops/testing.rs
@@ -34,15 +34,15 @@ deno_core::extension!(deno_test,
op_dispatch_test_event,
op_tests_should_stop,
],
- config = {
+ options = {
sender: TestEventSender,
fail_fast_tracker: FailFastTracker,
filter: TestFilter,
},
- state = |state, sender, fail_fast_tracker, filter| {
- state.put(sender);
- state.put(fail_fast_tracker);
- state.put(filter);
+ state = |state, options| {
+ state.put(options.sender);
+ state.put(options.fail_fast_tracker);
+ state.put(options.filter);
},
);