diff --git a/userspace/ksud/src/boot_patch.rs b/userspace/ksud/src/boot_patch.rs index 4ed3db82..b518de09 100644 --- a/userspace/ksud/src/boot_patch.rs +++ b/userspace/ksud/src/boot_patch.rs @@ -436,9 +436,11 @@ fn do_patch( } #[cfg(target_os = "android")] -fn calculate_sha1(file_path: impl AsRef) -> io::Result { - let mut file = File::open(file_path.as_ref())?; - let mut hasher = Sha1::new(); +fn calculate_sha1(file_path: impl AsRef) -> Result { + 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 {