diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index a8fd17a5..d132dedc 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -18,7 +18,6 @@ workspace = true alloy-primitives.workspace = true cfg-if.workspace = true dunce.workspace = true -memmap2.workspace = true once_cell.workspace = true path-slash.workspace = true regex.workspace = true diff --git a/crates/core/src/utils.rs b/crates/core/src/utils.rs index 13485c18..a9e20cb6 100644 --- a/crates/core/src/utils.rs +++ b/crates/core/src/utils.rs @@ -587,9 +587,8 @@ pub fn tempdir(name: &str) -> Result { /// Reads the json file and deserialize it into the provided type. pub fn read_json_file(path: &Path) -> Result { // See: https://github.com/serde-rs/json/issues/160 - let file = fs::File::open(path).map_err(|err| SolcError::io(err, path))?; - let bytes = unsafe { memmap2::Mmap::map(&file).map_err(|err| SolcError::io(err, path))? }; - serde_json::from_slice(&bytes).map_err(Into::into) + let s = fs::read_to_string(path).map_err(|err| SolcError::io(err, path))?; + serde_json::from_str(&s).map_err(Into::into) } /// Writes serializes the provided value to JSON and writes it to a file.