From 60466de5d5808280542d1a62f86bacffef555cc2 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Tue, 15 Mar 2022 22:58:03 +0100 Subject: [PATCH] cleanup(core): remove void_op_a?sync (#13953) In favour of `op_void_sync` & `op_void_async` --- core/examples/disable_ops.rs | 2 +- core/lib.rs | 4 ++-- core/ops_builtin.rs | 13 ------------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/core/examples/disable_ops.rs b/core/examples/disable_ops.rs index 9565d6e7f7..9850e58e2f 100644 --- a/core/examples/disable_ops.rs +++ b/core/examples/disable_ops.rs @@ -9,7 +9,7 @@ use deno_core::RuntimeOptions; fn main() { let my_ext = Extension::builder() .middleware(|name, opfn| match name { - "op_print" => deno_core::void_op_sync::v8_cb(), + "op_print" => deno_core::op_void_sync::v8_cb(), _ => opfn, }) .build(); diff --git a/core/lib.rs b/core/lib.rs index 29cdbba010..929a68cbb7 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -80,8 +80,8 @@ pub use crate::ops::PromiseId; pub use crate::ops_builtin::op_close; pub use crate::ops_builtin::op_print; pub use crate::ops_builtin::op_resources; -pub use crate::ops_builtin::void_op_async; -pub use crate::ops_builtin::void_op_sync; +pub use crate::ops_builtin::op_void_async; +pub use crate::ops_builtin::op_void_sync; pub use crate::ops_metrics::OpsTracker; pub use crate::resources::AsyncResult; pub use crate::resources::Resource; diff --git a/core/ops_builtin.rs b/core/ops_builtin.rs index a742a77b1b..92f77f9543 100644 --- a/core/ops_builtin.rs +++ b/core/ops_builtin.rs @@ -39,19 +39,6 @@ pub(crate) fn init_builtins() -> Extension { .build() } -#[op] -pub fn void_op_sync(_: &mut OpState) -> Result<(), Error> { - Ok(()) -} - -pub async fn void_op_async( - _state: Rc>, - _: (), - _: (), -) -> Result<(), Error> { - Ok(()) -} - /// Return map of resources with id as key /// and string representation as value. #[op]