From 2f692c4cc67273ec5093bd13aea8e6724dde93cb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 15 Sep 2020 18:40:39 +0200 Subject: [PATCH] fs: remove unnecessary Function#bind() in fs/promises PR-URL: https://github.com/nodejs/node/pull/35208 Reviewed-By: Colin Ihrig Reviewed-By: Masashi Hirano Reviewed-By: Anna Henningsen --- 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 9e1f6857d2cf96..a46a8b75992c4e 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -410,7 +410,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) {