pub fn cast_box<'a>(boxed: Box) -> &'a str { unsafe { &*Box::into_raw(boxed) } } #[allow(clippy::boxed_local)] pub fn cast_boxed<'a>(boxed_array: Box<[Box]>) -> Vec<&'a str> { boxed_array .iter() .map(|arg| cast_box(arg.to_owned())) .collect() }