Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b082de

Browse filesBrowse files
TrottBethGriggs
authored andcommitted
util: remove unused fast path in internal debuglog
The internal `debuglog()` is never called with 0 parameters. Remove the fast-path for that situation. If it ever occurs, it will fall through to the default path. PR-URL: #41605 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 4b174ce commit 2b082de
Copy full SHA for 2b082de

File tree

Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed
Open diff view settings
Collapse file

‎lib/internal/util/debuglog.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/debuglog.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ function debuglog(set, cb) {
8181
if (typeof cb === 'function')
8282
cb(debug);
8383
switch (args.length) {
84-
case 0: return debug();
8584
case 1: return debug(args[0]);
8685
case 2: return debug(args[0], args[1]);
8786
default: return debug(...new SafeArrayIterator(args));
@@ -95,7 +94,6 @@ function debuglog(set, cb) {
9594
};
9695
const logger = (...args) => {
9796
switch (args.length) {
98-
case 0: return debug();
9997
case 1: return debug(args[0]);
10098
case 2: return debug(args[0], args[1]);
10199
default: return debug(...new SafeArrayIterator(args));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.