ksud: Fix compiler error

This commit is contained in:
weishu
2024-04-24 21:36:38 +08:00
parent 063d5c8025
commit c8dd0b070c

View File

@@ -436,9 +436,11 @@ fn do_patch(
}
#[cfg(target_os = "android")]
fn calculate_sha1(file_path: impl AsRef<Path>) -> io::Result<String> {
let mut file = File::open(file_path.as_ref())?;
let mut hasher = Sha1::new();
fn calculate_sha1(file_path: impl AsRef<Path>) -> Result<String> {
use sha1::Digest;
use std::io::Read;
let mut file = std::fs::File::open(file_path.as_ref())?;
let mut hasher = sha1::Sha1::new();
let mut buffer = [0; 1024];
loop {