fix: md5 crate v0.7 API (compute not Digest) + clone default_layout_id

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mitchell R 2026-05-26 15:03:29 +02:00
parent 5d23079086
commit 34165b2c1d
No known key found for this signature in database
2 changed files with 3 additions and 6 deletions

View file

@ -69,7 +69,7 @@ impl KioskBundle {
height_px: d.height_px, height_px: d.height_px,
idle_timeout_seconds: d.idle_timeout_seconds, idle_timeout_seconds: d.idle_timeout_seconds,
sleep_timeout_seconds: d.sleep_timeout_seconds, sleep_timeout_seconds: d.sleep_timeout_seconds,
default_layout_id: d.default_layout_id, default_layout_id: d.default_layout_id.clone(),
layouts: self.layouts.clone(), layouts: self.layouts.clone(),
}]; }];
} }

View file

@ -694,11 +694,8 @@ fn extract_digest_field(header: &str, field: &str) -> Option<String> {
} }
fn md5_hex(input: &str) -> String { fn md5_hex(input: &str) -> String {
use md5::{Digest, Md5}; let digest = md5::compute(input.as_bytes());
let mut hasher = Md5::new(); hex_lower_bytes(&digest.0)
hasher.update(input.as_bytes());
let result = hasher.finalize();
hex_lower_bytes(&result)
} }
fn hex_lower_bytes(bytes: &[u8]) -> String { fn hex_lower_bytes(bytes: &[u8]) -> String {