]> git.bitcoin.ninja Git - ldk-c-bindings/commit
Make `Str`'s `clone` always clone the underlying bytes
authorMatt Corallo <git@bluematt.me>
Mon, 18 Apr 2022 02:56:05 +0000 (02:56 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 18 Apr 2022 02:56:05 +0000 (02:56 +0000)
commit8f3b8e4b52275f738016a4d1bbc8a0e9be90039e
tree4494db452feed24c5d6cbafb4f74246d22f9d6f4
parentd4f7ca4bd4e16b9311b4d6bcd518e6bac2778fe4
Make `Str`'s `clone` always clone the underlying bytes

Its incredibly unexpected that you can clone a higher-level object
(eg an Event with a ClosureReason that contains an `Str`) and have
a pointer back to the original object. To avoid this, `clone` needs
to actually `clone`.
lightning-c-bindings/src/c_types/mod.rs