clippy lint

This commit is contained in:
Christien Rioux 2024-01-21 15:50:48 -05:00
parent a092463f77
commit fd4d42c6a2

View File

@ -63,8 +63,8 @@ fn get_build_hash<Q: AsRef<Path>>(output_path: Q) -> Option<Vec<u8>> {
let lines = std::io::BufReader::new(std::fs::File::open(output_path).ok()?).lines(); let lines = std::io::BufReader::new(std::fs::File::open(output_path).ok()?).lines();
for l in lines { for l in lines {
let l = l.unwrap(); let l = l.unwrap();
if l.starts_with("//BUILDHASH:") { if let Some(rest) = l.strip_prefix("//BUILDHASH:") {
return Some(hex::decode(&l[12..]).unwrap()); return Some(hex::decode(rest).unwrap());
} }
} }
None None