Skip to content

Commit

Permalink
chore: remove unreachable code to pass linter (denoland#7270)
Browse files Browse the repository at this point in the history
  • Loading branch information
magurotuna committed Aug 31, 2020
1 parent d761246 commit 7799b79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
3 changes: 1 addition & 2 deletions cli/tests/unit/console_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,8 @@ unitTest(function consoleTestWithCustomInspector(): void {

unitTest(function consoleTestWithCustomInspectorError(): void {
class A {
[customInspect](): string {
[customInspect](): never {
throw new Error("BOOM");
return "b";
}
}

Expand Down
16 changes: 0 additions & 16 deletions std/fmt/printf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,53 +319,37 @@ class Printf {
switch (this.verb) {
case "t":
return this.pad(arg.toString());
break;
case "b":
return this.fmtNumber(arg as number, 2);
break;
case "c":
return this.fmtNumberCodePoint(arg as number);
break;
case "d":
return this.fmtNumber(arg as number, 10);
break;
case "o":
return this.fmtNumber(arg as number, 8);
break;
case "x":
return this.fmtHex(arg);
break;
case "X":
return this.fmtHex(arg, true);
break;
case "e":
return this.fmtFloatE(arg as number);
break;
case "E":
return this.fmtFloatE(arg as number, true);
break;
case "f":
case "F":
return this.fmtFloatF(arg as number);
break;
case "g":
return this.fmtFloatG(arg as number);
break;
case "G":
return this.fmtFloatG(arg as number, true);
break;
case "s":
return this.fmtString(arg as string);
break;
case "T":
return this.fmtString(typeof arg);
break;
case "v":
return this.fmtV(arg);
break;
case "j":
return this.fmtJ(arg);
break;
default:
return `%!(BAD VERB '${this.verb}')`;
}
Expand Down

0 comments on commit 7799b79

Please sign in to comment.