]> 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>
Wed, 3 Feb 2021 03:51:52 +0000 (22:51 -0500)
commit0a6c9e85ff86f4b3e814a8286c3c311ade4e0c4a
treeeb1e4dd0552fba5cf103956a2b57d065a665ee03
parentc7ddcd3867757c74d8a3a2997604edf52aa0a536
[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