diff options
author | Luca Casonato <hello@lcas.dev> | 2023-08-08 16:28:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-08 16:28:18 -0400 |
commit | 03e963f57831367a39996c7d88bc9875e97d52d7 (patch) | |
tree | 8920cda4906ad9300550679d2492f0023d0beabc /ext/node/package_json.rs | |
parent | f2e30a6f7999fa6ce4ab789266927e3abbb48e3f (diff) |
chore: rename some helpers on the Fs trait (#20097)
Rename some of the helper methods on the Fs trait to be suffixed with
`_sync` / `_async`, in preparation of the introduction of more async
methods for some helpers.
Also adds a `read_text_file_async` helper to complement the renamed
`read_text_file_sync` helper.
Diffstat (limited to 'ext/node/package_json.rs')
-rw-r--r-- | ext/node/package_json.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/package_json.rs b/ext/node/package_json.rs index 95ca8b561..ae5e159a1 100644 --- a/ext/node/package_json.rs +++ b/ext/node/package_json.rs @@ -81,7 +81,7 @@ impl PackageJson { return Ok(CACHE.with(|cache| cache.borrow()[&path].clone())); } - let source = match fs.read_to_string(&path) { + let source = match fs.read_text_file_sync(&path) { Ok(source) => source, Err(err) if err.kind() == ErrorKind::NotFound => { return Ok(PackageJson::empty(path)); |