diff options
| author | Andreu Botella <andreu@andreubotella.com> | 2022-05-13 10:36:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-13 10:36:31 +0200 |
| commit | 3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad (patch) | |
| tree | 7fcc92da290889d3d2290f6e4902ac60685aae87 /bench_util/benches/op_baseline.rs | |
| parent | 0ee76da07b12fba38962634e65853d73adf9d4c0 (diff) | |
chore(runtime): Make some ops in ext and runtime infallible. (#14589)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
Diffstat (limited to 'bench_util/benches/op_baseline.rs')
| -rw-r--r-- | bench_util/benches/op_baseline.rs | 18 |
1 files changed, 5 insertions, 13 deletions
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<Extension> { vec![Extension::builder() @@ -22,19 +16,17 @@ fn setup() -> Vec<Extension> { } #[op] -fn op_nop() -> Result<(), AnyError> { - Ok(()) -} +fn op_nop() {} #[op] -fn op_pi_json() -> Result<i64, AnyError> { - 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<RefCell<OpState>>) -> Result<i64, AnyError> { - Ok(314159) +async fn op_pi_async() -> i64 { + 314159 } fn bench_op_pi_json(b: &mut Bencher) { |
