From 5be8c96ae899f5944da70e1909da7e608afefafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 11 Nov 2022 00:22:14 +0100 Subject: feat: Stabilize Deno.bench() and 'deno bench' subcommand (#16485) --- cli/ops/bench.rs | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'cli/ops') diff --git a/cli/ops/bench.rs b/cli/ops/bench.rs index 1c62452d4..6fc881f61 100644 --- a/cli/ops/bench.rs +++ b/cli/ops/bench.rs @@ -21,7 +21,6 @@ use uuid::Uuid; pub fn init( sender: UnboundedSender, filter: TestFilter, - unstable: bool, ) -> Extension { Extension::builder() .ops(vec![ @@ -31,36 +30,15 @@ pub fn init( op_register_bench::decl(), op_dispatch_bench_event::decl(), op_bench_now::decl(), - op_bench_check_unstable::decl(), ]) .state(move |state| { state.put(sender.clone()); state.put(filter.clone()); - state.put(Unstable(unstable)); Ok(()) }) .build() } -pub struct Unstable(pub bool); - -fn check_unstable(state: &OpState, api_name: &str) { - let unstable = state.borrow::(); - - if !unstable.0 { - eprintln!( - "Unstable API '{}'. The --unstable flag must be provided.", - api_name - ); - std::process::exit(70); - } -} - -#[op] -fn op_bench_check_unstable(state: &mut OpState) { - check_unstable(state, "Deno.bench"); -} - #[derive(Clone)] struct PermissionsHolder(Uuid, Permissions); -- cgit v1.2.3