add buffer for file reading (#662)

This commit is contained in:
laizy 2021-12-10 01:45:13 +08:00 committed by GitHub
parent 0b1f3b1dcf
commit eeaab21049
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -354,6 +354,7 @@ impl ArtifactOutput for MinimalCombinedArtifacts {
fn read_cached_artifact(path: impl AsRef<Path>) -> Result<Self::Artifact> {
let file = fs::File::open(path.as_ref())?;
let file = io::BufReader::new(file);
Ok(serde_json::from_reader(file)?)
}