From e45e73b3357db47bae8b132848c591945efb9d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 19 Oct 2023 13:47:45 +0200 Subject: [PATCH] buffer: remove unnecessary assignment in fromString The assignment to the encoding variable has no effect. Refs: https://github.com/nodejs/node/pull/29217 PR-URL: https://github.com/nodejs/node/pull/50199 Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca --- lib/buffer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/buffer.js b/lib/buffer.js index 0ff7c1920adbba..ee30c69cc9611c 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -475,7 +475,6 @@ function fromString(string, encoding) { if (string.length === 0) return new FastBuffer(); ops = encodingOps.utf8; - encoding = undefined; } else { ops = getEncodingOps(encoding); if (ops === undefined)