Skip to main content

wrap_next

Function wrap_next 

Source
pub fn wrap_next(current: usize, len: usize) -> usize
Expand description

Next index in a list, wrapping around to 0 after the last element. Returns 0 if len is 0.