mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
fs: remove unnecessary Function#bind() in fs/promises
PR-URL: https://github.com/nodejs/node/pull/35208 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
9e673723e3
commit
ccbe267515
1 file changed
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user