summaryrefslogtreecommitdiff
path: root/std/textproto/mod.ts
diff options
context:
space:
mode:
authorYusuke Sakurai <kerokerokerop@gmail.com>2020-02-07 16:23:38 +0900
committerGitHub <noreply@github.com>2020-02-07 02:23:38 -0500
commitc2986891f6aac87cec98232735945af756e6643f (patch)
tree716dc739f438bf740fa960b87fc022d569090802 /std/textproto/mod.ts
parentea6179f7dce89416f1586ee18c2f437e68eabd38 (diff)
remove non-null assertion operator from std (part1) (#3900)
Diffstat (limited to 'std/textproto/mod.ts')
-rw-r--r--std/textproto/mod.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/textproto/mod.ts b/std/textproto/mod.ts
index 22153d17c..465753823 100644
--- a/std/textproto/mod.ts
+++ b/std/textproto/mod.ts
@@ -7,7 +7,7 @@ import { BufReader, UnexpectedEOFError } from "../io/bufio.ts";
import { charCode } from "../io/util.ts";
const asciiDecoder = new TextDecoder();
-function str(buf: Uint8Array): string {
+function str(buf: Uint8Array | null | undefined): string {
if (buf == null) {
return "";
} else {
@@ -82,7 +82,7 @@ export class TextProtoReader {
throw new UnexpectedEOFError();
} else if (buf[0] == charCode(" ") || buf[0] == charCode("\t")) {
throw new ProtocolError(
- `malformed MIME header initial line: ${str(line!)}`
+ `malformed MIME header initial line: ${str(line)}`
);
}
@@ -142,7 +142,7 @@ export class TextProtoReader {
const { line: l, more } = r;
// Avoid the copy if the first call produced a full line.
- if (!line! && !more) {
+ if (!line && !more) {
// TODO(ry):
// This skipSpace() is definitely misplaced, but I don't know where it
// comes from nor how to fix it.