pub fn clamped_or<'a, T>(
values: &'a [T],
if_empty: &'a T,
) -> impl Iterator<Item = &'a T> + Clone
Expand description
Iterate over all the values in the slice, then repeat the last value forever.
If the input slice is empty, the second argument is returned forever.