Skip to content

Commit 2d79bb9

Browse files
committed
fix(dashboard): fix md5 crate API and enable tokio process feature
md5 0.7 uses md5::compute() not md5::Md5, and tokio::process requires the 'process' feature flag in Cargo.toml.
1 parent 8ef7384 commit 2d79bb9

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

packages/dashboard/src-tauri/Cargo.lock

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

packages/dashboard/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ chrono = { version = "0.4", features = ["serde"] }
2121
dirs = "5"
2222
regex = "1"
2323
lazy_static = "1"
24-
tokio = { version = "1", features = ["fs", "io-util", "sync", "macros"] }
24+
tokio = { version = "1", features = ["fs", "io-util", "sync", "macros", "process"] }
2525
reqwest = { version = "0.12", features = ["json"] }
2626
md5 = "0.7"
2727
tauri-plugin-updater = "2"

packages/dashboard/src-tauri/src/db.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,11 @@ pub struct TableCount {
203203
/// the dashboard. The plugin uses its own Bun-based hash path.
204204
/// Match the plugin's `computeNormalizedHash`: lowercase → collapse whitespace → trim → MD5 hex.
205205
fn normalize_hash(content: &str) -> String {
206-
use md5::{Md5, Digest};
207206
let normalized = content.to_lowercase();
208207
// Collapse all whitespace runs into a single space (mirrors JS /\s+/g → " ")
209208
let normalized: String = normalized.split_whitespace().collect::<Vec<_>>().join(" ");
210-
let hash = Md5::digest(normalized.as_bytes());
211-
format!("{:032x}", hash)
209+
let digest = md5::compute(normalized.as_bytes());
210+
format!("{:032x}", digest)
212211
}
213212

214213
// ── Project resolution ────────────────────────────────────────

0 commit comments

Comments
 (0)