mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
bench(http): avoid obj destructuring for parity with std (#12528)
Might close gap in benchmark graph between std & native
This commit is contained in:
parent
e39dace8cb
commit
2ab3664e50
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Reference in a new issue