diff options
| author | Filip Wandzio <contact@philw.dev> | 2026-01-24 08:29:14 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2026-01-24 08:29:14 +0100 |
| commit | a393e0a2f2c3678a3ea869dc1417fa269f2b1040 (patch) | |
| tree | 606df6a9284b5bd2dbf84fa5e3d363b8e6a01322 /src/util/sha1.rs | |
| parent | 72ddd7b7704f2087a52c9c0552446682918c513b (diff) | |
| download | dml-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.rs | 3 |
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 @@ | |||
| 3 | use std::path::Path; | 3 | use std::path::Path; |
| 4 | 4 | ||
| 5 | use sha1::{Digest, Sha1}; | 5 | use sha1::{Digest, Sha1}; |
| 6 | use tokio::fs::read; | ||
| 6 | 7 | ||
| 7 | use crate::errors::McError; | 8 | use crate::errors::McError; |
| 8 | 9 | ||
| 9 | pub async fn sha1_hex(path: &Path) -> Result<String, McError> { | 10 | pub 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())) |
