summaryrefslogtreecommitdiff
path: root/core/examples/disable_ops.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2022-03-22 16:39:58 +0100
committerGitHub <noreply@github.com>2022-03-22 16:39:58 +0100
commitf81334d5bd1df723b1543dd906bd5672808bc75f (patch)
treef0cfe6da3c6078170a714d52272243ca647e119d /core/examples/disable_ops.rs
parentc9817c335c23a5b85d6262b0e42abef19075c975 (diff)
feat(core): disableable extensions & ops (#14063)
Streamlines a common middleware pattern and provides foundations for avoiding variably sized v8::ExternalReferences & enabling fully monomorphic op callpaths
Diffstat (limited to 'core/examples/disable_ops.rs')
-rw-r--r--core/examples/disable_ops.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/examples/disable_ops.rs b/core/examples/disable_ops.rs
index 7421961d4..c1473b193 100644
--- a/core/examples/disable_ops.rs
+++ b/core/examples/disable_ops.rs
@@ -9,7 +9,7 @@ use deno_core::RuntimeOptions;
fn main() {
let my_ext = Extension::builder()
.middleware(|op| match op.name {
- "op_print" => deno_core::op_void_sync::decl(),
+ "op_print" => op.disable(),
_ => op,
})
.build();