gir: fix per emit_by_name change
ObjectExt::emit_by_name now return the correct type directly
instead of Option<Value>
@@ -131,25 +131,21 @@ pub fn generate(
args.push_str(&par.name);
}
+ if trampoline.ret.typ != Default::default() {
writeln!(
w,
- "{}let {} = self.emit_by_name(\"{}\", &[{}]);",
+ "{}self.emit_by_name(\"{}\", &[{}])",
tabs(indent + 1),
- if trampoline.ret.typ != Default::default() {
- "res"
- } else {
- "_"
- },
analysis.signal_name,
args,
)?;
-
- if trampoline.ret.typ != Default::default() {
+ } else {
writeln!(
w,
- "{}res.unwrap().get().expect(\"Return Value for `{}`\")",
+ "{}self.emit_by_name::<()>(\"{}\", &[{}]);",
tabs(indent + 1),
- emit_name,
+ analysis.signal_name,
+ args,
)?;
}
writeln!(w, "{}}}", tabs(indent))?;
