Make `create_onion_message` a freestanding function
authorMatt Corallo <git@bluematt.me>
Mon, 25 Sep 2023 22:10:27 +0000 (22:10 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 1 Oct 2023 00:05:01 +0000 (00:05 +0000)
commit07205a2869bb057bfd53a33c0760cd46178b93ae
tree2c3799c05ec1f644644d0951b2c2947795ca08ac
parent6ce4c6cbc50966dae83cf23d727a3d4b48a64533
Make `create_onion_message` a freestanding function

The new `create_onion_message` function in `OnionMessenger` is hard
to handle - it has various generic requirements indirectly via the
struct, but they're not bounded by any of the method parameters.
Thus, you can't simply call `OnionMessenger::create_onion_message`,
as various bounds are not specified.

Instead, we move it to a freestanding function so that it can be
called directly without explicitly setting bounds.
lightning/src/onion_message/messenger.rs