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/ops/web_worker/sync_fetch.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/ops/web_worker') diff --git a/runtime/ops/web_worker/sync_fetch.rs b/runtime/ops/web_worker/sync_fetch.rs index 4d2f4ca5a..ec79118b2 100644 --- a/runtime/ops/web_worker/sync_fetch.rs +++ b/runtime/ops/web_worker/sync_fetch.rs @@ -6,7 +6,7 @@ use crate::web_worker::WebWorkerInternalHandle; use crate::web_worker::WebWorkerType; use deno_core::error::type_error; use deno_core::error::AnyError; -use deno_core::op; +use deno_core::op2; use deno_core::url::Url; use deno_core::OpState; use deno_fetch::data_url::DataUrl; @@ -33,10 +33,11 @@ pub struct SyncFetchScript { script: String, } -#[op] +#[op2] +#[serde] pub fn op_worker_sync_fetch( state: &mut OpState, - scripts: Vec, + #[serde] scripts: Vec, mut loose_mime_checks: bool, ) -> Result, AnyError> { let handle = state.borrow::().clone(); -- cgit v1.2.3