ref_slice

Function opt_slice

source
pub fn opt_slice<A>(opt: &Option<A>) -> &[A]
Expand description

Converts a reference to Option<A> into a slice of length 0 or 1 (without copying).