From c3cba7f22c49ca3a3f58df44d8ea4c85d8510bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 9 Mar 2023 08:10:54 -0400 Subject: refactor(core): Extension::builder_with_deps (#18093) Prerequisite for https://github.com/denoland/deno/pull/18080 --- ext/broadcast_channel/lib.rs | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'ext/broadcast_channel') diff --git a/ext/broadcast_channel/lib.rs b/ext/broadcast_channel/lib.rs index cb8d31890..3698cc885 100644 --- a/ext/broadcast_channel/lib.rs +++ b/ext/broadcast_channel/lib.rs @@ -110,20 +110,22 @@ pub fn init( bc: BC, unstable: bool, ) -> Extension { - Extension::builder(env!("CARGO_PKG_NAME")) - .dependencies(vec!["deno_webidl", "deno_web"]) - .esm(include_js_files!("01_broadcast_channel.js",)) - .ops(vec![ - op_broadcast_subscribe::decl::(), - op_broadcast_unsubscribe::decl::(), - op_broadcast_send::decl::(), - op_broadcast_recv::decl::(), - ]) - .state(move |state| { - state.put(bc.clone()); - state.put(Unstable(unstable)); - }) - .build() + Extension::builder_with_deps( + env!("CARGO_PKG_NAME"), + &["deno_webidl", "deno_web"], + ) + .esm(include_js_files!("01_broadcast_channel.js",)) + .ops(vec![ + op_broadcast_subscribe::decl::(), + op_broadcast_unsubscribe::decl::(), + op_broadcast_send::decl::(), + op_broadcast_recv::decl::(), + ]) + .state(move |state| { + state.put(bc.clone()); + state.put(Unstable(unstable)); + }) + .build() } pub fn get_declaration() -> PathBuf { -- cgit v1.2.3