From 9ded17d722b8da124987cdf16976589a46f2d3f5 Mon Sep 17 00:00:00 2001 From: Marcos Casagrande Date: Thu, 30 Apr 2020 22:39:25 +0200 Subject: BREAKING: reorder std/io/utils copyBytes arguments (#5022) --- std/ws/mod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/ws/mod.ts') diff --git a/std/ws/mod.ts b/std/ws/mod.ts index 2a18cded7..569936706 100644 --- a/std/ws/mod.ts +++ b/std/ws/mod.ts @@ -338,11 +338,11 @@ class WebSocketImpl implements WebSocket { async read(p: Uint8Array): Promise { for await (const ev of this.receive()) { if (ev instanceof Uint8Array) { - return copyBytes(p, ev); + return copyBytes(ev, p); } if (typeof ev === "string") { - return copyBytes(p, encode(ev)); + return copyBytes(encode(ev), p); } } -- cgit v1.2.3