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) --- ext/crypto/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ext/crypto') diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs index 8b329a7ca..e47cc8f3c 100644 --- a/ext/crypto/lib.rs +++ b/ext/crypto/lib.rs @@ -8,7 +8,6 @@ use deno_core::error::custom_error; use deno_core::error::not_supported; use deno_core::error::type_error; use deno_core::error::AnyError; -use deno_core::op; use deno_core::op2; use deno_core::ToJsBuffer; @@ -46,7 +45,6 @@ use sha2::Sha512; use signature::RandomizedSigner; use signature::Signer; use signature::Verifier; -use std::convert::TryFrom; use std::num::NonZeroU32; use std::path::PathBuf; @@ -422,10 +420,11 @@ pub struct DeriveKeyArg { info: Option, } -#[op] +#[op2(async)] +#[serde] pub async fn op_crypto_derive_bits( - args: DeriveKeyArg, - zero_copy: Option, + #[serde] args: DeriveKeyArg, + #[buffer] zero_copy: Option, ) -> Result { let algorithm = args.algorithm; match algorithm { -- cgit v1.2.3