Skip to content

Commit

Permalink
doc: use await in filehandle.truncate() snippet
Browse files Browse the repository at this point in the history
The example snippet of filehandle.close() uses the `await` keyword
based on convention. This change updates the example snippet of
filehandle.truncate() to similarly use the keyword for the purposes of
consistency.

PR-URL: #38939
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
  • Loading branch information
RA80533 authored and targos committed Jun 11, 2021
1 parent 5218fe8 commit 405b50c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/fs.md
Expand Up @@ -402,7 +402,7 @@ try {
filehandle = await open('temp.txt', 'r+');
await filehandle.truncate(4);
} finally {
filehandle?.close();
await filehandle?.close();
}
```
Expand Down

0 comments on commit 405b50c

Please sign in to comment.