X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Futil%2Finvoice.rs;h=5d785283c55794e8f5cdb83f43d9f75962bae380;hb=3e46e1794f14640e35f09cc6da4169c152de34ce;hp=9103429ada8e6210437c7539ae9c2f81194d7e00;hpb=18ac1ea0225fcf9d2073c1f7a03b13945572695d;p=ldk-c-bindings diff --git a/lightning-c-bindings/src/lightning/util/invoice.rs b/lightning-c-bindings/src/lightning/util/invoice.rs index 9103429..5d78528 100644 --- a/lightning-c-bindings/src/lightning/util/invoice.rs +++ b/lightning-c-bindings/src/lightning/util/invoice.rs @@ -9,6 +9,7 @@ //! Low level invoice utilities. use alloc::str::FromStr; +use alloc::string::String; use core::ffi::c_void; use core::convert::Infallible; use bitcoin::hashes::Hash; @@ -18,7 +19,7 @@ use alloc::{vec::Vec, boxed::Box}; /// Construct the invoice's HRP and signatureless data into a preimage to be hashed. #[no_mangle] -pub extern "C" fn construct_invoice_preimage(mut hrp_bytes: crate::c_types::u8slice, mut data_without_signature: crate::c_types::derived::CVec_u5Z) -> crate::c_types::derived::CVec_u8Z { +pub extern "C" fn construct_invoice_preimage(mut hrp_bytes: crate::c_types::u8slice, mut data_without_signature: crate::c_types::derived::CVec_U5Z) -> crate::c_types::derived::CVec_u8Z { let mut local_data_without_signature = Vec::new(); for mut item in data_without_signature.into_rust().drain(..) { local_data_without_signature.push( { item.into() }); }; let mut ret = lightning::util::invoice::construct_invoice_preimage(hrp_bytes.to_slice(), &local_data_without_signature[..]); let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { item }); };