Skip to content

Commit

Permalink
buffer: remove unnecessary assignment in fromString
Browse files Browse the repository at this point in the history
The assignment to the encoding variable has no effect.

Refs: nodejs#29217
PR-URL: nodejs#50199
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
tniessen authored Oct 19, 2023
1 parent 765339a commit e45e73b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e45e73b

Please sign in to comment.