Skip to main content

summarize_status_js

Function summarize_status_js 

Source
pub fn summarize_status_js(codes: &[i32]) -> Vec<u32>
Expand description

Folds entries into counts.

codes is a flat i32 array of [index, worktree, index, worktree, ...], interleaved to match how the caller already has the data.

Exported rather than taking a Vec<Entry> because that would need js_sys to read it off the JS side. Two flat arrays would work too; interleaving keeps the caller’s construction to one loop.