]> git.bitcoin.ninja Git - rust-lightning/commit
[UPSTREAM] 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>
Sat, 11 May 2024 20:05:45 +0000 (20:05 +0000)
commitbc7dc7ad8c7d91ffda5c356bef81c5b349fae6e8
tree320a1f96a589ea853ff337de3d7e8384b28b8ae0
parentb5b6346fd56c17ad74219c2b64006c9c4dba6a28
[UPSTREAM] 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/offer.rs