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 <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Tobias Nießen 2023-10-19 13:47:45 +02:00 committed by GitHub
parent 765339a32c
commit e45e73b335
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)