File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1580,8 +1580,10 @@ impl Bindgen for FunctionBindgen<'_> {
15801580 match amt {
15811581 0 => { }
15821582 1 => {
1583- self . push_str ( & operands[ 0 ] ) ;
1584- self . push_str ( "\n " ) ;
1583+ if & operands[ 0 ] != "()" {
1584+ self . push_str ( & operands[ 0 ] ) ;
1585+ self . push_str ( "\n " ) ;
1586+ }
15851587 }
15861588 _ => {
15871589 self . push_str ( "(" ) ;
Original file line number Diff line number Diff line change @@ -88,8 +88,10 @@ pub trait RustGenerator {
8888 sig : & FnSig ,
8989 ) -> Vec < String > {
9090 let params = self . print_docs_and_params ( iface, func, param_mode, & sig) ;
91- self . push_str ( " -> " ) ;
92- self . print_ty ( iface, & func. result , TypeMode :: Owned ) ;
91+ if !std:: matches!( func. result, Type :: Unit ) {
92+ self . push_str ( " -> " ) ;
93+ self . print_ty ( iface, & func. result , TypeMode :: Owned ) ;
94+ }
9395 params
9496 }
9597
You can’t perform that action at this time.
0 commit comments