]> git.bitcoin.ninja Git - rust-lightning/commit
[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>
Fri, 15 Jan 2021 00:49:14 +0000 (19:49 -0500)
commita54b230e846b563acdb949eef2e6bbf9937b1831
tree463fe85b5e954e7cfca82bbf2179075699948e19
parent3abcde7bfe92f591052b196f25504acd97046b1b
[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