Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ccbe267

Browse filesBrowse files
bnoordhuisdanielleadams
authored andcommitted
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 9e67372 commit ccbe267
Copy full SHA for ccbe267

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/fs/promises.js‎

Copy file name to clipboardExpand all lines: lib/internal/fs/promises.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ async function rename(oldPath, newPath) {
431431

432432
async function truncate(path, len = 0) {
433433
const fd = await open(path, 'r+');
434-
return ftruncate(fd, len).finally(fd.close.bind(fd));
434+
return ftruncate(fd, len).finally(fd.close);
435435
}
436436

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.