[bindings] Pipe errors back from write_template_constructor
authorMatt Corallo <git@bluematt.me>
Wed, 30 Dec 2020 20:25:02 +0000 (15:25 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 4 Jan 2021 21:14:26 +0000 (16:14 -0500)
commitd18a38064aeba70bfde716e907628024c266ba75
treeec164cd27ce1b8abf8c76e1a2bdefd4d7f80ccc5
parenta3b46a793e84f96b69c6562ef970dc41a4ac5f7d
[bindings] Pipe errors back from write_template_constructor

We can fail to resolve a part of a tuple, resulting in a panic in
write_template_constructor even if we're calling
`understood_c_type` with the intent of figuring out whether we can
print a type at all. Instead, we should pipe errors back and let
`understood_c_type` return false as a result.
c-bindings-gen/src/types.rs