summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-10-25 18:51:17 +0200
committerGitHub <noreply@github.com>2021-10-25 18:51:17 +0200
commit2ab3664e509a73b58ca65560cf18ce29b1173271 (patch)
tree521b415a1b224a8bf00b433db58c63b308681aa8
parente39dace8cb4b1868e811fd13b87f2a81e84b98ce (diff)
bench(http): avoid obj destructuring for parity with std (#12528)
Might close gap in benchmark graph between std & native
-rw-r--r--cli/bench/deno_http_native.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/bench/deno_http_native.js b/cli/bench/deno_http_native.js
index d68f8ea81..abb2d061f 100644
--- a/cli/bench/deno_http_native.js
+++ b/cli/bench/deno_http_native.js
@@ -11,8 +11,8 @@ const body = encoder.encode("Hello World");
for await (const conn of listener) {
(async () => {
const requests = Deno.serveHttp(conn);
- for await (const { respondWith } of requests) {
- respondWith(new Response(body))
+ for await (const event of requests) {
+ event.respondWith(new Response(body))
.catch((e) => console.log(e));
}
})();