Skip to content

Commit 9352062

Browse files
committed
build-manifest: use BufReader
1 parent fde1135 commit 9352062

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

+2-2
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;
@@ -632,7 +632,7 @@ impl Builder {
632632
}
633633

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

0 commit comments

Comments
 (0)