diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-07-08 04:20:41 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-07-07 15:20:41 -0400 |
commit | 9a01d6455ec3cfa955967102f576cb542999321a (patch) | |
tree | 82a4ab5776a09432f23b9ed99a31306c884c833e /io/ioutil_test.ts | |
parent | 6a0858bd5d9d327ac7f46bee5f5b2fab642f2a3f (diff) |
Upgrade to v0.11.0 (update Reader interface) (denoland/deno_std#527)
Original: https://github.com/denoland/deno_std/commit/3ea90d54f6dad4bcc3d32e63601096a6c0ff3ce4
Diffstat (limited to 'io/ioutil_test.ts')
-rw-r--r-- | io/ioutil_test.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/io/ioutil_test.ts b/io/ioutil_test.ts index 4e34f5698..97ab244c0 100644 --- a/io/ioutil_test.ts +++ b/io/ioutil_test.ts @@ -1,7 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. const { Buffer } = Deno; type Reader = Deno.Reader; -type ReadResult = Deno.ReadResult; import { test } from "../testing/mod.ts"; import { assertEquals } from "../testing/asserts.ts"; import { @@ -19,10 +18,10 @@ class BinaryReader implements Reader { constructor(private bytes: Uint8Array = new Uint8Array(0)) {} - async read(p: Uint8Array): Promise<ReadResult> { + async read(p: Uint8Array): Promise<number | Deno.EOF> { p.set(this.bytes.subarray(this.index, p.byteLength)); this.index += p.byteLength; - return { nread: p.byteLength, eof: false }; + return p.byteLength; } } |