[][src]Function show_notes::e013::refs_all_around

pub fn refs_all_around<'a>(input: &'a [i32]) -> Option<&'a [i32]>

Get a(n optional) sub-slice of a slice.

Note that here we have a reference coming both directions, and therefore lifetimes on both the input and the output.

What we're doing here is returning a reference to everything but the "head" of the slice. Since the slice might be empty, or might have only one element, we treat this as an optional.