X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Frouting%2Futxo.rs;fp=lightning-c-bindings%2Fsrc%2Flightning%2Frouting%2Futxo.rs;h=187badd8629479e12a50ead78002b053b00bb354;hp=7f741e2865966058c64be98f1cecede522b71ab5;hb=3e46e1794f14640e35f09cc6da4169c152de34ce;hpb=53e91fd10d98313d2175470416f635d080e67e65 diff --git a/lightning-c-bindings/src/lightning/routing/utxo.rs b/lightning-c-bindings/src/lightning/routing/utxo.rs index 7f741e2..187badd 100644 --- a/lightning-c-bindings/src/lightning/routing/utxo.rs +++ b/lightning-c-bindings/src/lightning/routing/utxo.rs @@ -13,6 +13,7 @@ //! order to announce a channel. This module handles that checking. use alloc::str::FromStr; +use alloc::string::String; use core::ffi::c_void; use core::convert::Infallible; use bitcoin::hashes::Hash; @@ -206,8 +207,7 @@ pub struct UtxoLookup { } unsafe impl Send for UtxoLookup {} unsafe impl Sync for UtxoLookup {} -#[no_mangle] -pub(crate) extern "C" fn UtxoLookup_clone_fields(orig: &UtxoLookup) -> UtxoLookup { +pub(crate) fn UtxoLookup_clone_fields(orig: &UtxoLookup) -> UtxoLookup { UtxoLookup { this_arg: orig.this_arg, get_utxo: Clone::clone(&orig.get_utxo), @@ -231,6 +231,11 @@ impl core::ops::Deref for UtxoLookup { self } } +impl core::ops::DerefMut for UtxoLookup { + fn deref_mut(&mut self) -> &mut Self { + self + } +} /// Calls the free function if one is set #[no_mangle] pub extern "C" fn UtxoLookup_free(this_ptr: UtxoLookup) { }