diff options
Diffstat (limited to 'std/io/bufio.ts')
-rw-r--r-- | std/io/bufio.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/std/io/bufio.ts b/std/io/bufio.ts index df3ecb002..da44729b2 100644 --- a/std/io/bufio.ts +++ b/std/io/bufio.ts @@ -7,7 +7,7 @@ type Reader = Deno.Reader; type Writer = Deno.Writer; type WriterSync = Deno.WriterSync; -import { copyBytes } from "../bytes/mod.ts"; +import { copy } from "../bytes/mod.ts"; import { assert } from "../_util/assert.ts"; const DEFAULT_BUF_SIZE = 4096; @@ -150,7 +150,7 @@ export class BufReader implements Reader { } // copy as much as we can - const copied = copyBytes(this.buf.subarray(this.r, this.w), p, 0); + const copied = copy(this.buf.subarray(this.r, this.w), p, 0); this.r += copied; // this.lastByte = this.buf[this.r - 1]; // this.lastCharSize = -1; @@ -502,7 +502,7 @@ export class BufWriter extends AbstractBufBase implements Writer { throw e; } } else { - numBytesWritten = copyBytes(data, this.buf, this.usedBufferBytes); + numBytesWritten = copy(data, this.buf, this.usedBufferBytes); this.usedBufferBytes += numBytesWritten; await this.flush(); } @@ -510,7 +510,7 @@ export class BufWriter extends AbstractBufBase implements Writer { data = data.subarray(numBytesWritten); } - numBytesWritten = copyBytes(data, this.buf, this.usedBufferBytes); + numBytesWritten = copy(data, this.buf, this.usedBufferBytes); this.usedBufferBytes += numBytesWritten; totalBytesWritten += numBytesWritten; return totalBytesWritten; @@ -595,7 +595,7 @@ export class BufWriterSync extends AbstractBufBase implements WriterSync { throw e; } } else { - numBytesWritten = copyBytes(data, this.buf, this.usedBufferBytes); + numBytesWritten = copy(data, this.buf, this.usedBufferBytes); this.usedBufferBytes += numBytesWritten; this.flush(); } @@ -603,7 +603,7 @@ export class BufWriterSync extends AbstractBufBase implements WriterSync { data = data.subarray(numBytesWritten); } - numBytesWritten = copyBytes(data, this.buf, this.usedBufferBytes); + numBytesWritten = copy(data, this.buf, this.usedBufferBytes); this.usedBufferBytes += numBytesWritten; totalBytesWritten += numBytesWritten; return totalBytesWritten; |