X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Fmain.rs;h=a283c35d40d41d0612836ee3befdee6725f53182;hb=3b0598c5e5b457b260db673fcffa2c6423354200;hp=d107f3e9a6c66af726c4c84602c45c209686712c;hpb=4b3c6041d34566b1f398cb3277482e505a6a36aa;p=ldk-c-bindings diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index d107f3e..a283c35 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -606,11 +606,7 @@ fn writeln_struct<'a, 'b, W: std::io::Write>(w: &mut W, s: &'a syn::ItemStruct, let local_var = types.write_to_c_conversion_new_var(w, &format_ident!("inner_val"), &ref_type, Some(&gen_types), true); if local_var { write!(w, "\n\t").unwrap(); } types.write_to_c_conversion_inline_prefix(w, &ref_type, Some(&gen_types), true); - if local_var { - write!(w, "inner_val").unwrap(); - } else { - write!(w, "(*inner_val)").unwrap(); - } + write!(w, "inner_val").unwrap(); types.write_to_c_conversion_inline_suffix(w, &ref_type, Some(&gen_types), true); writeln!(w, "\n}}").unwrap(); }