Skip to content

Commit

Permalink
proxy gen - multiple outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Mar 20, 2024
1 parent 4a3fc93 commit 88eb1a4
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ fn parse_and_write_outputs(file: &mut File, outputs: Vec<OutputAbi>) {
let adjusted = adjust_type_name(&outputs[0].type_names.rust);
write!(file, "{adjusted}").unwrap();
},
_ => panic!("multiple outputs not yet supported"),
_ => {
write!(file, "MultiValue{}<", outputs.len()).unwrap();
for (i, output) in outputs.iter().enumerate() {
if i > 0 {
write!(file, ", ").unwrap();
}
let adjusted = adjust_type_name(&output.type_names.rust);
write!(file, "{adjusted}").unwrap();
}
write!(file, ">").unwrap();
},
}
}

0 comments on commit 88eb1a4

Please sign in to comment.