From ae6aea04b839785d45e3d0f390b65ce11a3c5717 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 15 Sep 2020 18:40:39 +0200 Subject: [PATCH] fs/promise: remove unnecessary Function#bind() --- lib/internal/fs/promises.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index a938b382eb1268..9450bd48019044 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -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) {