1 use crate::compat::*; 2 new_boxed_option_slice<T>(size: usize) -> Box<[Option<T>]>3 pub fn new_boxed_option_slice<T>(size: usize) -> Box<[Option<T>]> { 4 let mut vector = Vec::with_capacity(size); 5 for _ in 0 .. size { 6 vector.push(None) 7 } 8 vector.into_boxed_slice() 9 } 10