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 aduh95 committed Nov 7, 2020
1 parent d396900 commit f06f3c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/promises.js
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 f06f3c0

Please sign in to comment.