diff options
Diffstat (limited to 'src/review')
| -rw-r--r-- | src/review/diff.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/review/diff.rs b/src/review/diff.rs index 4a8a3ef..39d9066 100644 --- a/src/review/diff.rs +++ b/src/review/diff.rs @@ -266,6 +266,19 @@ pub fn diff_digest(ps: &[Panel]) -> String { crate::hash::hex_str(&render_text(ps)) } +/// Render a candidate's diff, store its digest on the row, and return it. +/// +/// Test-tier only, and that is worth stating plainly because the number says +/// something alarming at first glance: zero callers in `src/`, seventeen test +/// files. Intake renders through `review::intake::record`, which is the single +/// entry point the pipeline and both front ends use; this is the older, +/// uncomposed form that says "render and store" in two steps. It stays because +/// a test that wants a digest without running intake wants exactly this, and it +/// is gated rather than moved to `tests/common` because it needs this module's +/// private `panels`/`render_text` and `candidates::set_diff_digest` — widening +/// those to let a test out would undo the narrowing this crate just spent a +/// dozen commits doing. +#[cfg(feature = "test-support")] pub fn render_and_store(db: &Db, cfg: &Config, c: &CandidateRow) -> Result<String> { let base = match c.base_release_id { Some(id) => db::release_by_id(db, id)?, |
