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 <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
bnoordhuis authored and danielleadams committed Nov 9, 2020
1 parent 9e67372 commit ccbe267
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 @@ -431,7 +431,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 ccbe267

Please sign in to comment.