From e492223edac2c572533da22b95dc9ce42e7a64fe Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 15 Jan 2021 08:57:19 +1100 Subject: [PATCH] refactor(op_crate/fetch): align streams to spec (denoland/deno#9103) Fixes denoland/deno#8814 --- async/pool.ts | 2 +- io/streams_test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/async/pool.ts b/async/pool.ts index 77ac8f0bdbf5..8aeb2671d48d 100644 --- a/async/pool.ts +++ b/async/pool.ts @@ -42,5 +42,5 @@ export function pooledMap( await Promise.all(executing); writer.close(); })(); - return res.readable.getIterator(); + return res.readable[Symbol.asyncIterator](); } diff --git a/io/streams_test.ts b/io/streams_test.ts index 5017b1f4f9bb..594fc2357cc8 100644 --- a/io/streams_test.ts +++ b/io/streams_test.ts @@ -181,7 +181,7 @@ Deno.test("toReadableCheck", async function (): Promise { const writableStream = readableStreamFromAsyncIterator(iter); const decoder = new TextDecoder(); - for await (const chunk of writableStream.getIterator()) { + for await (const chunk of writableStream) { readChunks.push(decoder.decode(chunk)); }