summaryrefslogtreecommitdiff
path: root/runtime/examples/extension_with_ops
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/examples/extension_with_ops')
-rw-r--r--runtime/examples/extension_with_ops/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/examples/extension_with_ops/main.rs b/runtime/examples/extension_with_ops/main.rs
index 1feb4ba27..2ef562ec9 100644
--- a/runtime/examples/extension_with_ops/main.rs
+++ b/runtime/examples/extension_with_ops/main.rs
@@ -4,7 +4,7 @@ use std::path::Path;
use std::rc::Rc;
use deno_core::error::AnyError;
-use deno_core::op;
+use deno_core::op2;
use deno_core::FsModuleLoader;
use deno_core::ModuleSpecifier;
use deno_runtime::permissions::PermissionsContainer;
@@ -13,8 +13,8 @@ use deno_runtime::worker::WorkerOptions;
deno_core::extension!(hello_runtime, ops = [op_hello]);
-#[op]
-fn op_hello(text: &str) {
+#[op2(fast)]
+fn op_hello(#[string] text: &str) {
println!("Hello {}!", text);
}