From f7b4b643ebc52a4d72d90d9adbdddc9aa0721e4a Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Wed, 25 Feb 2026 16:10:23 +0100 Subject: Feat: Refactor core download logic with concurrency and async features Implement basic unit testing Implement automatic java executable switching based on game version Split loader module into smaller modules Implement basic documentation --- src/util/sha1.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/util/sha1.rs') diff --git a/src/util/sha1.rs b/src/util/sha1.rs index 6684963..6fed18d 100644 --- a/src/util/sha1.rs +++ b/src/util/sha1.rs @@ -2,14 +2,15 @@ use std::path::Path; -use sha1::{Digest, Sha1}; +use sha1::{Digest, Sha1, Sha1Core}; +use sha1::digest::core_api::CoreWrapper; use tokio::fs::read; use crate::errors::McError; pub async fn sha1_hex(path: &Path) -> Result { - let data = read(path).await?; - let mut hasher = Sha1::new(); + let data: Vec = read(path).await?; + let mut hasher: CoreWrapper = Sha1::new(); hasher.update(&data); Ok(format!("{:x}", hasher.finalize())) } -- cgit v1.2.3