feat: add str shasum prop

This commit is contained in:
2026-03-24 22:53:53 +01:00
parent 6a37f26eaa
commit 4add7f22f9
2 changed files with 16 additions and 2 deletions

View File

@@ -87,6 +87,14 @@ fn extend_asset_tuple(ts: &mut TokenStream, buf: &[u8], mime: &str, sha256sum: [
extend_array(&mut ts, &sha256sum);
ts
},
{
let mut ts = TokenStream::new();
let sha_str = sha256sum
.iter()
.fold(String::new(), |acc, b| acc + &format!("{b:02x}"));
ts.extend(std::iter::once(Literal::string(&sha_str)));
ts
},
]
.into_iter(),
);