diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-24 13:14:03 -0500 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-01-24 13:33:51 -0500 |
| commit | 73d5d7c680d3973b8ca8c9eaf535918790757ee9 (patch) | |
| tree | d4d13847d57b723cbd1e54a4a28946bf4e12caf5 | |
| parent | 441bc0982b1ff9c363a1e767d0a9ef7a35e6518c (diff) | |
format
Original: https://github.com/denoland/deno_std/commit/f911eca8d124d8b992b4b8171ad38a4d674469e3
| -rw-r--r-- | ws/mod.ts | 5 | ||||
| -rw-r--r-- | ws/sha1.ts | 7 |
2 files changed, 4 insertions, 8 deletions
@@ -246,10 +246,7 @@ export async function writeFrame(frame: WebSocketFrame, writer: Writer) { let header: Uint8Array; const hasMask = frame.mask ? 0x80 : 0; if (payloadLength < 126) { - header = new Uint8Array([ - 0x80 | frame.opcode, - hasMask | payloadLength - ]); + header = new Uint8Array([0x80 | frame.opcode, hasMask | payloadLength]); } else if (payloadLength < 0xffff) { header = new Uint8Array([ 0x80 | frame.opcode, diff --git a/ws/sha1.ts b/ws/sha1.ts index 916bbd9b3..38101fb22 100644 --- a/ws/sha1.ts +++ b/ws/sha1.ts @@ -64,7 +64,7 @@ export class Sha1 { let code, index = 0, i, - start = this._start, + start = this._start, length = message.length || 0, blocks = this._blocks; @@ -369,8 +369,7 @@ export class Sha1 { arrayBuffer() { this.finalize(); - return Uint32Array.of( - this._h0, this._h1, this._h2, this._h3, this._h4 - ).buffer; + return Uint32Array.of(this._h0, this._h1, this._h2, this._h3, this._h4) + .buffer; } } |
