]> git.bitcoin.ninja Git - rust-lightning/commit
Make `offers::Amount` `Copy` and export it in bindings
authorMatt Corallo <git@bluematt.me>
Sat, 11 May 2024 18:51:48 +0000 (18:51 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 13 May 2024 18:55:22 +0000 (18:55 +0000)
commit6bc2a573bb3b09c840ecbe085e97d29a04f2f54e
tree4da87cbc1ae04227a90708e7de4c2fe8d3fca7b2
parent5c21ee98a853027f9231be0b8309a3d111de2d0c
Make `offers::Amount` `Copy` and export it in bindings

`Amount` is less than two pointers long, so there's no reason it
shouldn't be `Copy`. Further, because its an enum, bindings can't
map a reference to it in an `Option`. Thus, here, we simply make it
`Copy` and return it in `Option`s rather than a reference to it.
lightning/src/offers/invoice.rs
lightning/src/offers/invoice_request.rs
lightning/src/offers/offer.rs