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 /cli/ops/bench.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 'cli/ops/bench.rs')
-rw-r--r-- | cli/ops/bench.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cli/ops/bench.rs b/cli/ops/bench.rs index 6f4b80974..e028aa6b1 100644 --- a/cli/ops/bench.rs +++ b/cli/ops/bench.rs @@ -45,9 +45,8 @@ fn check_unstable(state: &OpState, api_name: &str) { } #[op] -fn op_bench_check_unstable(state: &mut OpState) -> Result<(), AnyError> { +fn op_bench_check_unstable(state: &mut OpState) { check_unstable(state, "Deno.bench"); - Ok(()) } #[derive(Clone)] @@ -94,19 +93,14 @@ pub fn op_restore_test_permissions( } #[op] -fn op_get_bench_origin(state: &mut OpState) -> Result<String, AnyError> { - Ok(state.borrow::<ModuleSpecifier>().to_string()) +fn op_get_bench_origin(state: &mut OpState) -> String { + state.borrow::<ModuleSpecifier>().to_string() } #[op] -fn op_dispatch_bench_event( - state: &mut OpState, - event: BenchEvent, -) -> Result<(), AnyError> { +fn op_dispatch_bench_event(state: &mut OpState, event: BenchEvent) { let sender = state.borrow::<UnboundedSender<BenchEvent>>().clone(); sender.send(event).ok(); - - Ok(()) } #[op] |