From 03e963f57831367a39996c7d88bc9875e97d52d7 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 8 Aug 2023 16:28:18 -0400 Subject: 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. --- ext/node/package_json.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node/package_json.rs') 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)); -- cgit v1.2.3