diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2019-03-05 11:53:35 +1100 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-04 19:53:35 -0500 |
| commit | 17663c12326dd1053f89a3bd741807f139973dae (patch) | |
| tree | 4588e84042b0155e11d7f5442ae38a6007922585 /textproto | |
| parent | 9f33cd28963a72d8fea0b1e99bb61ca9bec21a94 (diff) | |
Add eslint for linting (denoland/deno_std#235)
Original: https://github.com/denoland/deno_std/commit/c0390ade3de4d825423c9f0f5e1aa56ffd509942
Diffstat (limited to 'textproto')
| -rw-r--r-- | textproto/mod.ts | 22 | ||||
| -rw-r--r-- | textproto/test.ts | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/textproto/mod.ts b/textproto/mod.ts index ee7647296..28eac4609 100644 --- a/textproto/mod.ts +++ b/textproto/mod.ts @@ -22,6 +22,17 @@ export class ProtocolError extends Error { } } +export function append(a: Uint8Array, b: Uint8Array): Uint8Array { + if (a == null) { + return b; + } else { + const output = new Uint8Array(a.length + b.length); + output.set(a, 0); + output.set(b, a.length); + return output; + } +} + export class TextProtoReader { constructor(readonly r: BufReader) {} @@ -137,14 +148,3 @@ export class TextProtoReader { return [line, null]; } } - -export function append(a: Uint8Array, b: Uint8Array): Uint8Array { - if (a == null) { - return b; - } else { - const output = new Uint8Array(a.length + b.length); - output.set(a, 0); - output.set(b, a.length); - return output; - } -} diff --git a/textproto/test.ts b/textproto/test.ts index 0f8bee227..b6a4c93c9 100644 --- a/textproto/test.ts +++ b/textproto/test.ts @@ -92,7 +92,7 @@ test(async function textprotoAppend() { test(async function textprotoReadEmpty() { let r = reader(""); - let [m, err] = await r.readMIMEHeader(); + let [, err] = await r.readMIMEHeader(); // Should not crash! assertEqual(err, "EOF"); }); |
