Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2022-01-24 17:39:22 +0300
committerGitHub <noreply@github.com>2022-01-24 17:39:22 +0300
commit49ba2104c495935bc83390dc8c4cd82bd4c24db9 (patch)
tree309fcb3fdd6721342944be8ec5034f75dbba26df /lib
parentc0ef0d5a66e079349803fb8890f98745919d4803 (diff)
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: https://github.com/nodejs/node/pull/41605 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/util/debuglog.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/internal/util/debuglog.js b/lib/internal/util/debuglog.js
index 93c741e7535..4b5c7cab44a 100644
--- a/lib/internal/util/debuglog.js
+++ b/lib/internal/util/debuglog.js
@@ -81,7 +81,6 @@ function debuglog(set, cb) {
if (typeof cb === 'function')
cb(debug);
switch (args.length) {
- case 0: return debug();
case 1: return debug(args[0]);
case 2: return debug(args[0], args[1]);
default: return debug(...new SafeArrayIterator(args));
@@ -95,7 +94,6 @@ function debuglog(set, cb) {
};
const logger = (...args) => {
switch (args.length) {
- case 0: return debug();
case 1: return debug(args[0]);
case 2: return debug(args[0], args[1]);
default: return debug(...new SafeArrayIterator(args));