diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-09 08:10:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 12:10:54 +0000 |
commit | c3cba7f22c49ca3a3f58df44d8ea4c85d8510bff (patch) | |
tree | c710275a5c51b8a4c8175a3ebe92c928272bf3dc /ext/http/lib.rs | |
parent | 521cb4ca9b9b02f7ba3150338d5f3c4b035aab8d (diff) |
refactor(core): Extension::builder_with_deps (#18093)
Prerequisite for https://github.com/denoland/deno/pull/18080
Diffstat (limited to 'ext/http/lib.rs')
-rw-r--r-- | ext/http/lib.rs | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/ext/http/lib.rs b/ext/http/lib.rs index eb7381773..14a93ede9 100644 --- a/ext/http/lib.rs +++ b/ext/http/lib.rs @@ -78,20 +78,22 @@ pub mod compressible; mod reader_stream; pub fn init() -> Extension { - Extension::builder(env!("CARGO_PKG_NAME")) - .dependencies(vec!["deno_web", "deno_net", "deno_fetch", "deno_websocket"]) - .esm(include_js_files!("01_http.js",)) - .ops(vec![ - op_http_accept::decl(), - op_http_write_headers::decl(), - op_http_headers::decl(), - op_http_write::decl(), - op_http_write_resource::decl(), - op_http_shutdown::decl(), - op_http_websocket_accept_header::decl(), - op_http_upgrade_websocket::decl(), - ]) - .build() + Extension::builder_with_deps( + env!("CARGO_PKG_NAME"), + &["deno_web", "deno_net", "deno_fetch", "deno_websocket"], + ) + .esm(include_js_files!("01_http.js",)) + .ops(vec![ + op_http_accept::decl(), + op_http_write_headers::decl(), + op_http_headers::decl(), + op_http_write::decl(), + op_http_write_resource::decl(), + op_http_shutdown::decl(), + op_http_websocket_accept_header::decl(), + op_http_upgrade_websocket::decl(), + ]) + .build() } pub enum HttpSocketAddr { |