From ccbe26751501f2a24bc37406932db449e950f9ed 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 39c662fdc5b9c8..df80efb514d2dc 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -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) {