From 142449ecab20006c5cfd15462814650596bc034d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Sep 2023 16:08:23 +0200 Subject: refactor: rewrite some ops to op2 macro (#20603) --- runtime/examples/extension_with_ops/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/examples') 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); } -- cgit v1.2.3