Function indices::indices_slice

source ·
pub fn indices_slice<'a, T>(
    slice: &'a mut [T],
    indices: &[usize]
) -> Vec<&'a mut T>
Expand description

Returns mutable references for the requested indices in the provided slice. Panics if any index is out of bounds or duplicate indices.