summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/bufio.ts3
-rw-r--r--io/util.ts6
2 files changed, 2 insertions, 7 deletions
diff --git a/io/bufio.ts b/io/bufio.ts
index 0dd2b94b4..05e6b0a0c 100644
--- a/io/bufio.ts
+++ b/io/bufio.ts
@@ -4,7 +4,8 @@
// license that can be found in the LICENSE file.
import { Reader, ReadResult, Writer } from "deno";
-import { assert, charCode, copyBytes } from "./util.ts";
+import { charCode, copyBytes } from "./util.ts";
+import { assert } from "../testing/mod.ts";
const DEFAULT_BUF_SIZE = 4096;
const MIN_BUF_SIZE = 16;
diff --git a/io/util.ts b/io/util.ts
index 811940b4d..3266e5018 100644
--- a/io/util.ts
+++ b/io/util.ts
@@ -1,11 +1,5 @@
import { Buffer, Reader } from "deno";
-export function assert(cond: boolean, msg = "assert") {
- if (!cond) {
- throw Error(msg);
- }
-}
-
// `off` is the offset into `dst` where it will at which to begin writing values
// from `src`.
// Returns the number of bytes copied.