Change deprecated function Vec::from_slice