chore(api): update Cargo dependency and build script

This commit is contained in:
ZhenYi 2026-05-11 17:05:50 +08:00
parent ec29673d14
commit 0f800da74d
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ reqwest = { workspace = true, features = ["json", "native-tls", "stream"] }
[build-dependencies]
brotli = "7"
flate2 = "1"
sha2 = "0.10"
sha2 = "0.11"
[lints]
workspace = true

View File

@ -37,7 +37,7 @@ fn compute_etag(data: &[u8]) -> String {
hasher.update(data);
let hash = hasher.finalize();
// First 32 hex chars for a compact etag
format!("{:x}", hash)[..32].to_string()
hash.iter().map(|b| format!("{:02x}", b)).take(16).collect::<String>()
}
// ── Asset collection ─────────────────────────────────────────────────────