Skip to content

Commit 77f6f51

Browse files
authored
Merge pull request #61 from faststats-dev/renovate/sha2-0.x
fix(deps): update rust crate sha2 to 0.11
2 parents 87b7ba7 + cd13c37 commit 77f6f51

File tree

3 files changed

+84
-25
lines changed

3 files changed

+84
-25
lines changed

Cargo.lock

Lines changed: 78 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ flate2 = "1.1.5"
1111
regex = "1.12.2"
1212
serde = "1.0.228"
1313
serde_json = "1.0.145"
14-
sha2 = "0.10"
14+
sha2 = "0.11"
1515
sqlx = { version = "0.8.6", features = ["runtime-tokio-rustls", "postgres", "sqlite", "macros", "uuid", "time"] }
1616
tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread", "signal"] }
1717
zstd = "0.13.3"

src/utils/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ pub fn sha256_hex(parts: &[&[u8]]) -> String {
88
for part in parts {
99
hasher.update(part);
1010
}
11-
format!("{:x}", hasher.finalize())
11+
hasher
12+
.finalize()
13+
.iter()
14+
.map(|b| format!("{:02x}", b))
15+
.collect()
1216
}
1317

1418
pub fn hash_to_uuid(hash: &str) -> Uuid {

0 commit comments

Comments
 (0)