refactor: deduplicate package_hashes by reusing grey_state version#808
refactor: deduplicate package_hashes by reusing grey_state version#808wangzishuai1987 wants to merge 1 commit into
Conversation
Genesis ReviewComparison targets:
How to reviewPost a comment with the following format (rank from best to worst): Use the short commit hashes above and To meta-review another reviewer's comment, react with 👍 or 👎. |
|
/review Deduplicates |
|
JAR Bot: Review recorded from @sorpaas (1 reviews, 0 meta-reviews). |
|
/review Updating to merge. Deduplicates |
|
JAR Bot: Quorum reached — triggering merge. |
`grey_state::accumulate::package_hashes` and `grey_services::accumulation::accumulated_package_hashes` had identical core logic (extract package_hash from WorkReport slice). The only difference was an optional `.take(count)` in the grey-services version. Make `package_hashes` pub in grey-state and have grey-services delegate to it with a truncated slice, eliminating the duplication. Contributes to jarchain#186.
fefea5e to
3985d51
Compare
Summary
Contributes to #186 — eliminate code duplication across grey crates.
Two functions with identical core logic existed in separate crates:
Changes
Testing
All existing tests pass. No behavior changes — pure refactoring.