mirror of
https://github.com/jj-vcs/jj.git
synced 2026-07-03 14:02:54 +08:00
Before this commit, external crates trying to use `#[derive(ContentHash)]` need to explicitly depend on the `digest` crate because the proc-macro refers to `digest::Update`.965d6ce4eintended to prevent this inconvenience by introducing a `jj_lib::content_hash::DigestUpdate` re-export, and it correctly used it in the macro output. However,8e1a6c708("Add support for generics to #[derive(ContentHash)]") accidentally reverted it back to `digest::Update` when rewriting the `quote!` block. This is the fixup to8e1a6c708to make things work as originally intended. Now, with just a `jj-lib` dependency, the following should work: ```rust use jj_lib::content_hash::ContentHash; #[derive(ContentHash)] struct Foo { x: u32, y: String, } ```