Skip to content

Commit

Permalink
fs: remove unnecessary Function#bind() in fs/promises
Browse files Browse the repository at this point in the history
PR-URL: #35208
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
bnoordhuis authored and BethGriggs committed Dec 15, 2020
1 parent ffe517b commit 2f692c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/promises.js
Expand Up @@ -410,7 +410,7 @@ async function rename(oldPath, newPath) {

async function truncate(path, len = 0) {
const fd = await open(path, 'r+');
return ftruncate(fd, len).finally(fd.close.bind(fd));
return ftruncate(fd, len).finally(fd.close);
}

async function ftruncate(handle, len = 0) {
Expand Down

0 comments on commit 2f692c4

Please sign in to comment.