summaryrefslogtreecommitdiff
path: root/runtime/ops/mod.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-02 15:47:57 +0200
committerGitHub <noreply@github.com>2021-04-02 09:47:57 -0400
commit058579da562989ed15c86598053644bbc86c6747 (patch)
tree7f0f2bf30684dcbb350b93d987771f17a4abd250 /runtime/ops/mod.rs
parentadf57610904cb4f4ef25fb077f6e39c9017a4ea9 (diff)
refactor(ops): remove variadic buffers (#9944)
Diffstat (limited to 'runtime/ops/mod.rs')
-rw-r--r--runtime/ops/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/ops/mod.rs b/runtime/ops/mod.rs
index 073b17c86..b497f6a42 100644
--- a/runtime/ops/mod.rs
+++ b/runtime/ops/mod.rs
@@ -31,7 +31,6 @@ use deno_core::json_op_async;
use deno_core::json_op_sync;
use deno_core::serde::de::DeserializeOwned;
use deno_core::serde::Serialize;
-use deno_core::BufVec;
use deno_core::JsRuntime;
use deno_core::OpState;
use deno_core::ValueOrVector;
@@ -45,7 +44,7 @@ pub fn reg_json_async<F, V, R, RV>(
name: &'static str,
op_fn: F,
) where
- F: Fn(Rc<RefCell<OpState>>, V, BufVec) -> R + 'static,
+ F: Fn(Rc<RefCell<OpState>>, V, Option<ZeroCopyBuf>) -> R + 'static,
V: DeserializeOwned,
R: Future<Output = Result<RV, AnyError>> + 'static,
RV: Serialize + 'static,
@@ -55,7 +54,7 @@ pub fn reg_json_async<F, V, R, RV>(
pub fn reg_json_sync<F, V, R>(rt: &mut JsRuntime, name: &'static str, op_fn: F)
where
- F: Fn(&mut OpState, V, &mut [ZeroCopyBuf]) -> Result<R, AnyError> + 'static,
+ F: Fn(&mut OpState, V, Option<ZeroCopyBuf>) -> Result<R, AnyError> + 'static,
V: DeserializeOwned,
R: Serialize + 'static,
{
@@ -64,7 +63,7 @@ where
pub fn reg_bin_async<F, R, RV>(rt: &mut JsRuntime, name: &'static str, op_fn: F)
where
- F: Fn(Rc<RefCell<OpState>>, u32, BufVec) -> R + 'static,
+ F: Fn(Rc<RefCell<OpState>>, u32, Option<ZeroCopyBuf>) -> R + 'static,
R: Future<Output = Result<RV, AnyError>> + 'static,
RV: ValueOrVector,
{
@@ -73,7 +72,8 @@ where
pub fn reg_bin_sync<F, R>(rt: &mut JsRuntime, name: &'static str, op_fn: F)
where
- F: Fn(&mut OpState, u32, &mut [ZeroCopyBuf]) -> Result<R, AnyError> + 'static,
+ F:
+ Fn(&mut OpState, u32, Option<ZeroCopyBuf>) -> Result<R, AnyError> + 'static,
R: ValueOrVector,
{
rt.register_op(name, metrics_op(name, bin_op_sync(op_fn)));