Skip to content

Commit 07f1055

Browse files
pietroalbiniMark-Simulacrum
authored andcommitted
build-manifest: use BufReader
1 parent 8c3d79d commit 07f1055

File tree

1 file changed

+2
-2
lines changed
  • src/tools/build-manifest/src

1 file changed

+2
-2
lines changed

src/tools/build-manifest/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::collections::{BTreeMap, HashMap, HashSet};
1515
use std::env;
1616
use std::error::Error;
1717
use std::fs::{self, File};
18-
use std::io::{self, Read, Write};
18+
use std::io::{self, BufReader, Read, Write};
1919
use std::path::{Path, PathBuf};
2020
use std::process::{Command, Stdio};
2121
use std::sync::Mutex;
@@ -636,7 +636,7 @@ impl Builder {
636636
}
637637

638638
fn fetch_hash(path: &Path) -> Result<String, Box<dyn Error>> {
639-
let mut file = File::open(path)?;
639+
let mut file = BufReader::new(File::open(path)?);
640640
let mut sha256 = sha2::Sha256::default();
641641
std::io::copy(&mut file, &mut sha256)?;
642642
Ok(hex::encode(sha256.finalize()))

0 commit comments

Comments
 (0)