Avoid returning a reference to a u64.
authorMatt Corallo <git@bluematt.me>
Sun, 18 Sep 2022 13:55:08 +0000 (13:55 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 19 Sep 2022 15:22:07 +0000 (15:22 +0000)
commit8edc1327917cf826788a2eec38a0123aa1c275fe
tree17e08d6f5c27c3abf1b5d806f7ec6a48c2b9e981
parenteebf05aef31a7de12559f406a7d03745552d98c1
Avoid returning a reference to a u64.

In c353c3ed7c40e689a3b9fb6730c6dabbd3c92cc5 an accessor method was
added which returns an `Option<&u64>`. While this allows Rust to
return an 8-byte object, returning a reference to something
pointer-sized is a somewhat strange API.

Instead, we opt for a straight `Option<u64>`, which is sadly
somewhat larger on the stack, but is simpler and already supported
in the bindings generation.
lightning-invoice/src/payment.rs