From d0970daacda0b6f6c2077c2f81948536b574bbe9 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 12 Jun 2020 09:19:29 -0400 Subject: make std deno-lint clean (#6240) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- std/http/file_server.ts | 4 +++- std/http/server.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'std/http') diff --git a/std/http/file_server.ts b/std/http/file_server.ts index 66babfd57..d9ed56236 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -135,7 +135,9 @@ async function serveDir( let fileInfo = null; try { fileInfo = await stat(filePath); - } catch (e) {} + } catch (e) { + // Pass + } listEntry.push({ mode: modeToString(entry.isDirectory, fileInfo?.mode ?? null), size: entry.isFile ? fileLenToString(fileInfo?.size ?? 0) : "", diff --git a/std/http/server.ts b/std/http/server.ts index 18bfc4731..d2736cb43 100644 --- a/std/http/server.ts +++ b/std/http/server.ts @@ -90,7 +90,9 @@ export class ServerRequest { try { // Eagerly close on error. this.conn.close(); - } catch {} + } catch { + // Pass + } err = e; } // Signal that this request has been processed and the next pipelined @@ -108,7 +110,9 @@ export class ServerRequest { // Consume unread body const body = this.body; const buf = new Uint8Array(1024); - while ((await body.read(buf)) !== null) {} + while ((await body.read(buf)) !== null) { + // Pass + } this.finalized = true; } } -- cgit v1.2.3