Skip to content

Commit c6dd823

Browse files
deps: bump md-5 from 0.10.6 to 0.11.0 (#3146)
Bumps [md-5](https://github.com/RustCrypto/hashes) from 0.10.6 to 0.11.0. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/RustCrypto/hashes/commit/b5051e5a5e7dc86a6c27c1ec7a390744ebcfb97a"><code>b5051e5</code></a> Cut new releases (<a href="https://redirect.github.com/RustCrypto/hashes/issues/812">#812</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/451c446d2810ef5136e3a92d2b0617514bc51a9d"><code>451c446</code></a> md5: replace <code>force-soft</code> crate feature with <code>md5_backend</code> configuration flag...</li> <li><a href="https://github.com/RustCrypto/hashes/commit/2f00175af936de46b3ddefe65c4de93cb4e876e4"><code>2f00175</code></a> Release sha1 v0.11.0 (<a href="https://redirect.github.com/RustCrypto/hashes/issues/810">#810</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/07d370c4a0d7cfab1f2a2e3d21bbb44e5669ee32"><code>07d370c</code></a> sha1: refactor backends selection (<a href="https://redirect.github.com/RustCrypto/hashes/issues/808">#808</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/7c7cb76e8a4978fb319a43122393cae0afc4b73d"><code>7c7cb76</code></a> Fix md5 project link in README (<a href="https://redirect.github.com/RustCrypto/hashes/issues/809">#809</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/ffe093984c004769747e998f77da8ff7c0e7a765"><code>ffe0939</code></a> Release sha2 0.11.0 (<a href="https://redirect.github.com/RustCrypto/hashes/issues/806">#806</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/8991b65fe400c31c4cc189510f86ae642c470cd9"><code>8991b65</code></a> Use the standard order of the <code>[package]</code> section fields (<a href="https://redirect.github.com/RustCrypto/hashes/issues/807">#807</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/3d2bc57db40fd6aeb25d6c6da98d67e2784c2985"><code>3d2bc57</code></a> sha2: refactor backends (<a href="https://redirect.github.com/RustCrypto/hashes/issues/802">#802</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/faa55fb83697c8f3113636d88070e5f5edc8c335"><code>faa55fb</code></a> sha3: bump <code>keccak</code> to v0.2 (<a href="https://redirect.github.com/RustCrypto/hashes/issues/803">#803</a>)</li> <li><a href="https://github.com/RustCrypto/hashes/commit/d3e6489e56f8486d4a93ceb7a8abf4924af1de7b"><code>d3e6489</code></a> sha3 v0.11.0-rc.9 (<a href="https://redirect.github.com/RustCrypto/hashes/issues/801">#801</a>)</li> <li>Additional commits viewable in <a href="https://github.com/RustCrypto/hashes/compare/md-5-v0.10.6...md2-v0.11.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=md-5&package-manager=cargo&previous-version=0.10.6&new-version=0.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
1 parent c8db13d commit c6dd823

6 files changed

Lines changed: 16 additions & 8 deletions

File tree

Cargo.lock

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

crates/headroom-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tokenizers = "0.23"
2525
hf-hub = { version = "0.5", default-features = false, features = ["ureq", "rustls-tls"] }
2626
# `md5` for the CCR cache_key. Python's compression_store hashes the original
2727
# diff with MD5 truncated to 24 hex chars; we must match byte-for-byte.
28-
md-5 = "0.10"
28+
md-5 = "0.11"
2929
# `sha2` for `_hash_field_name` in smart_crusher (SHA256 truncated to 16
3030
# hex chars). Python uses `hashlib.sha256` so we need byte-exact parity.
3131
sha2 = "0.11"

crates/headroom-core/src/transforms/anchor_selector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ fn calculate_structural_uniqueness(item: &Value, all_items: &[Value]) -> f64 {
350350
pub fn compute_item_hash(item: &Value) -> String {
351351
let content = python_json_dumps_sort_keys(item);
352352
let digest = Md5::digest(content.as_bytes());
353-
let hex = format!("{:x}", digest);
353+
let hex: String = digest.iter().map(|byte| format!("{byte:02x}")).collect();
354354
hex[..16].to_string()
355355
}
356356

crates/headroom-core/src/transforms/smart_crusher/orchestration.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,11 @@ fn item_content_hash(item: &Value, idx: usize) -> String {
305305
_ => format!("__idx_{}__", idx),
306306
};
307307
let digest = Md5::digest(content.as_bytes());
308-
format!("{:x}", digest)[..16].to_string()
308+
digest
309+
.iter()
310+
.map(|byte| format!("{byte:02x}"))
311+
.collect::<String>()[..16]
312+
.to_string()
309313
}
310314
}
311315

crates/headroom-core/src/transforms/smart_crusher/planning.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,11 @@ impl<'a> SmartCrusherPlanner<'a> {
390390
.unwrap_or("");
391391
let truncated: String = msg.chars().take(50).collect();
392392
let digest = Md5::digest(truncated.as_bytes());
393-
let hash = format!("{:x}", digest)[..8].to_string();
393+
let hash = digest
394+
.iter()
395+
.map(|byte| format!("{byte:02x}"))
396+
.collect::<String>()[..8]
397+
.to_string();
394398
clusters.entry(hash).or_default().push(i);
395399
}
396400
// Keep up to 2 representatives from each cluster.

crates/headroom-proxy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async-trait = "0.1"
9292
# ordering — never persisted, never compared cross-host. Same crate
9393
# the core uses for the CCR cache_key, so no additional hash backend
9494
# enters the dep tree.
95-
md-5 = "0.10"
95+
md-5 = "0.11"
9696

9797
[dev-dependencies]
9898
tower = { workspace = true, features = ["util"] }

0 commit comments

Comments
 (0)