From 3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Fri, 13 May 2022 10:36:31 +0200 Subject: chore(runtime): Make some ops in ext and runtime infallible. (#14589) Co-authored-by: Aaron O'Mullan --- bench_util/benches/op_baseline.rs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'bench_util') diff --git a/bench_util/benches/op_baseline.rs b/bench_util/benches/op_baseline.rs index 052ac2cb2..46501e4f7 100644 --- a/bench_util/benches/op_baseline.rs +++ b/bench_util/benches/op_baseline.rs @@ -2,14 +2,8 @@ use deno_bench_util::bench_or_profile; use deno_bench_util::bencher::{benchmark_group, Bencher}; use deno_bench_util::{bench_js_async, bench_js_sync}; -use deno_core::error::AnyError; use deno_core::op; - use deno_core::Extension; -use deno_core::OpState; - -use std::cell::RefCell; -use std::rc::Rc; fn setup() -> Vec { vec![Extension::builder() @@ -22,19 +16,17 @@ fn setup() -> Vec { } #[op] -fn op_nop() -> Result<(), AnyError> { - Ok(()) -} +fn op_nop() {} #[op] -fn op_pi_json() -> Result { - Ok(314159) +fn op_pi_json() -> i64 { + 314159 } // this is a function since async closures aren't stable #[op] -async fn op_pi_async(_: Rc>) -> Result { - Ok(314159) +async fn op_pi_async() -> i64 { + 314159 } fn bench_op_pi_json(b: &mut Bencher) { -- cgit v1.2.3