Skip to content

Commit

Permalink
ksud: Fix compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Apr 24, 2024
1 parent 063d5c8 commit c8dd0b0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions userspace/ksud/src/boot_patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c8dd0b0

Please sign in to comment.