diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-09-21 16:08:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 08:08:23 -0600 |
commit | 142449ecab20006c5cfd15462814650596bc034d (patch) | |
tree | b4e796585f870fbf0b1ebe696a474abb1a09d2ac /runtime/ops/web_worker/sync_fetch.rs | |
parent | cf6f649829fbb0562681bc9db0c4c1261d4a40b1 (diff) |
refactor: rewrite some ops to op2 macro (#20603)
Diffstat (limited to 'runtime/ops/web_worker/sync_fetch.rs')
-rw-r--r-- | runtime/ops/web_worker/sync_fetch.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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<String>, + #[serde] scripts: Vec<String>, mut loose_mime_checks: bool, ) -> Result<Vec<SyncFetchScript>, AnyError> { let handle = state.borrow::<WebWorkerInternalHandle>().clone(); |