Skip to main content

consecutive_segments

Function consecutive_segments 

Source
pub fn consecutive_segments(values: &[u32]) -> Vec<ConsecutiveSegment>
Expand description

Collapse an ordered sequence into standalone values and consecutive ranges.

Duplicate values are coalesced, and descending steps start a new segment.