summaryrefslogtreecommitdiff
path: root/ops/op2/dispatch_slow.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-06-29 10:23:14 -0600
committerGitHub <noreply@github.com>2023-06-29 10:23:14 -0600
commitfbb69329343c9985c26181e6297e6556c46d381d (patch)
treeee428c94727bdfdf9040a4944bd66981b4cd07fb /ops/op2/dispatch_slow.rs
parent98df69fd4cbe3687e2ff3519fbd6bff4e5f3101f (diff)
refactor(ops): op2 support for generics (#19636)
Implementation of generics for `#[op2]`, along with some refactoring to improve the ergonomics of ops with generics parameters: - The ops have generics on the struct rather than the associated methods, which allows us to trait-ify ops (impossible when they are on the methods) - The decl() method can become a trait-associated const field which unlocks future optimizations Callers of ops need to switch from: `op_net_connect_tcp::call::<TestPermission>(conn_state, ip_addr)` to `op_net_connect_tcp::<TestPermission>::call(conn_state, ip_addr)`.
Diffstat (limited to 'ops/op2/dispatch_slow.rs')
-rw-r--r--ops/op2/dispatch_slow.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ops/op2/dispatch_slow.rs b/ops/op2/dispatch_slow.rs
index 478f872cd..bf36e5d83 100644
--- a/ops/op2/dispatch_slow.rs
+++ b/ops/op2/dispatch_slow.rs
@@ -74,7 +74,7 @@ pub(crate) fn generate_dispatch_slow(
} = &generator_state;
Ok(quote! {
- pub extern "C" fn #slow_function(#info: *const #deno_core::v8::FunctionCallbackInfo) {
+ extern "C" fn #slow_function(#info: *const #deno_core::v8::FunctionCallbackInfo) {
#with_scope
#with_retval
#with_args