From eeaab210498a0dd3a539e3a928a54108b63d3aed Mon Sep 17 00:00:00 2001 From: laizy Date: Fri, 10 Dec 2021 01:45:13 +0800 Subject: [PATCH] add buffer for file reading (#662) --- ethers-solc/src/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ethers-solc/src/config.rs b/ethers-solc/src/config.rs index 4f97dd1e..c88f4395 100644 --- a/ethers-solc/src/config.rs +++ b/ethers-solc/src/config.rs @@ -354,6 +354,7 @@ impl ArtifactOutput for MinimalCombinedArtifacts { fn read_cached_artifact(path: impl AsRef) -> Result { let file = fs::File::open(path.as_ref())?; + let file = io::BufReader::new(file); Ok(serde_json::from_reader(file)?) }