summaryrefslogtreecommitdiff
path: root/runtime/examples
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-09-21 16:08:23 +0200
committerGitHub <noreply@github.com>2023-09-21 08:08:23 -0600
commit142449ecab20006c5cfd15462814650596bc034d (patch)
treeb4e796585f870fbf0b1ebe696a474abb1a09d2ac /runtime/examples
parentcf6f649829fbb0562681bc9db0c4c1261d4a40b1 (diff)
refactor: rewrite some ops to op2 macro (#20603)
Diffstat (limited to 'runtime/examples')
-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);
}