aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/sha1.rs
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2026-01-24 08:29:14 +0100
committerFilip Wandzio <contact@philw.dev>2026-01-24 08:29:14 +0100
commita393e0a2f2c3678a3ea869dc1417fa269f2b1040 (patch)
tree606df6a9284b5bd2dbf84fa5e3d363b8e6a01322 /src/util/sha1.rs
parent72ddd7b7704f2087a52c9c0552446682918c513b (diff)
downloaddml-a393e0a2f2c3678a3ea869dc1417fa269f2b1040.tar.gz
dml-a393e0a2f2c3678a3ea869dc1417fa269f2b1040.zip
Resolve audio not loading bug
Ensure all assets are downloading for each version Temporarily disable minecraft versions older than 1.8 because of the asset/manifest loading issues Implement basic documentation of modules Implement basic async/multithreading for downloading assets
Diffstat (limited to 'src/util/sha1.rs')
-rw-r--r--src/util/sha1.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/sha1.rs b/src/util/sha1.rs
index c5f1021..6684963 100644
--- a/src/util/sha1.rs
+++ b/src/util/sha1.rs
@@ -3,11 +3,12 @@
3use std::path::Path; 3use std::path::Path;
4 4
5use sha1::{Digest, Sha1}; 5use sha1::{Digest, Sha1};
6use tokio::fs::read;
6 7
7use crate::errors::McError; 8use crate::errors::McError;
8 9
9pub async fn sha1_hex(path: &Path) -> Result<String, McError> { 10pub async fn sha1_hex(path: &Path) -> Result<String, McError> {
10 let data = tokio::fs::read(path).await?; 11 let data = read(path).await?;
11 let mut hasher = Sha1::new(); 12 let mut hasher = Sha1::new();
12 hasher.update(&data); 13 hasher.update(&data);
13 Ok(format!("{:x}", hasher.finalize())) 14 Ok(format!("{:x}", hasher.finalize()))