fmt second pass
parent
5513e65cc7
commit
e7d7fe6740
|
@ -116,9 +116,10 @@ impl Vlm for Instance {
|
||||||
let opts_c: Vec<CString>;
|
let opts_c: Vec<CString>;
|
||||||
let enabled = if enabled { 1 } else { 0 };
|
let enabled = if enabled { 1 } else { 0 };
|
||||||
if let Some(vec) = options {
|
if let Some(vec) = options {
|
||||||
opts_c = vec.into_iter()
|
opts_c = vec
|
||||||
.map(|x| CString::new(x).expect("Error: Unexpected null byte"))
|
.into_iter()
|
||||||
.collect();
|
.map(|x| CString::new(x).expect("Error: Unexpected null byte"))
|
||||||
|
.collect();
|
||||||
opts_c_ptr = opts_c.iter().map(|x| x.as_ptr()).collect();
|
opts_c_ptr = opts_c.iter().map(|x| x.as_ptr()).collect();
|
||||||
} else {
|
} else {
|
||||||
opts_c_ptr = Vec::new();
|
opts_c_ptr = Vec::new();
|
||||||
|
|
Loading…
Reference in New Issue