From 0f800da74d55487ceff12cbefc2e6cb427f40279 Mon Sep 17 00:00:00 2001 From: ZhenYi <434836402@qq.com> Date: Mon, 11 May 2026 17:05:50 +0800 Subject: [PATCH] chore(api): update Cargo dependency and build script --- libs/api/Cargo.toml | 2 +- libs/api/build.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/api/Cargo.toml b/libs/api/Cargo.toml index 63c4d5a..5dbe663 100644 --- a/libs/api/Cargo.toml +++ b/libs/api/Cargo.toml @@ -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 diff --git a/libs/api/build.rs b/libs/api/build.rs index ef59c21..94e5b2d 100644 --- a/libs/api/build.rs +++ b/libs/api/build.rs @@ -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::() } // ── Asset collection ─────────────────────────────────────────────────────