summaryrefslogtreecommitdiff
path: root/ext/net/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net/lib.rs')
-rw-r--r--ext/net/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/net/lib.rs b/ext/net/lib.rs
index c9b888a65..84358210e 100644
--- a/ext/net/lib.rs
+++ b/ext/net/lib.rs
@@ -76,9 +76,6 @@ pub fn init<P: NetPermissions + 'static>(
unstable: bool,
unsafely_ignore_certificate_errors: Option<Vec<String>>,
) -> Extension {
- let mut ops_to_register = vec![];
- ops_to_register.extend(ops::init::<P>());
- ops_to_register.extend(ops_tls::init::<P>());
Extension::builder()
.js(include_js_files!(
prefix "deno:ext/net",
@@ -86,7 +83,7 @@ pub fn init<P: NetPermissions + 'static>(
"02_tls.js",
"04_net_unstable.js",
))
- .ops(ops_to_register)
+ .ops([&ops::init::<P>()[..], &ops_tls::init::<P>()[..]].concat())
.state(move |state| {
state.put(DefaultTlsOptions {
root_cert_store: root_cert_store.clone(),