Skip to content

Commit

Permalink
fs/promise: remove unnecessary Function#bind()
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Sep 15, 2020
1 parent 2b3eb10 commit ae6aea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,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 ae6aea0

Please sign in to comment.