From e89295b176b4f494d19b547b6b4d7c98d0cf1da1 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Thu, 29 Apr 2021 00:16:45 +0200 Subject: refactor(extensions): reintroduce builder (#10412) --- op_crates/url/lib.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'op_crates/url/lib.rs') diff --git a/op_crates/url/lib.rs b/op_crates/url/lib.rs index 49e34c47d..1d7a9b08b 100644 --- a/op_crates/url/lib.rs +++ b/op_crates/url/lib.rs @@ -17,12 +17,12 @@ use std::panic::catch_unwind; use std::path::PathBuf; pub fn init() -> Extension { - Extension::with_ops( - include_js_files!( + Extension::builder() + .js(include_js_files!( prefix "deno:op_crates/url", "00_url.js", - ), - vec![ + )) + .ops(vec![ ("op_url_parse", op_sync(op_url_parse)), ( "op_url_parse_search_params", @@ -32,9 +32,8 @@ pub fn init() -> Extension { "op_url_stringify_search_params", op_sync(op_url_stringify_search_params), ), - ], - None, - ) + ]) + .build() } #[derive(Deserialize)] -- cgit v1.2.3