- writeln!(w, "pub extern \"C\" fn {}_some(o: {}) -> {} {{", mangled_container, inner_type, mangled_container).unwrap();
- writeln!(w, "\t{}::Some(o)", mangled_container).unwrap();
+ if inner_type != "" {
+ writeln!(w, "pub extern \"C\" fn {}_some(o: {}) -> {} {{", mangled_container, inner_type, mangled_container).unwrap();
+ writeln!(w, "\t{}::Some(o)", mangled_container).unwrap();
+ } else {
+ writeln!(w, "pub extern \"C\" fn {}_some() -> {} {{", mangled_container, mangled_container).unwrap();
+ writeln!(w, "\t{}::Some", mangled_container).unwrap();
+ }