fmt second pass

6-output_list_wrappers-macro
Pierre Réveillon 2021-11-22 09:23:46 +01:00
parent 5513e65cc7
commit e7d7fe6740
1 changed files with 4 additions and 3 deletions

View File

@ -116,7 +116,8 @@ impl Vlm for Instance {
let opts_c: Vec<CString>;
let enabled = if enabled { 1 } else { 0 };
if let Some(vec) = options {
opts_c = vec.into_iter()
opts_c = vec
.into_iter()
.map(|x| CString::new(x).expect("Error: Unexpected null byte"))
.collect();
opts_c_ptr = opts_c.iter().map(|x| x.as_ptr()).collect();