Skip to content

Commit 2f692c4

Browse files
bnoordhuisBethGriggs
authored andcommittedDec 15, 2020
fs: remove unnecessary Function#bind() in fs/promises
PR-URL: #35208 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent ffe517b commit 2f692c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/internal/fs/promises.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ async function rename(oldPath, newPath) {
410410

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

416416
async function ftruncate(handle, len = 0) {

0 commit comments

Comments
 (0)
Please sign in to comment.