X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Fchain%2Fchaininterface.rs;h=7d8291d64fd2fa88dd4d5e671b04a856ab6c8630;hp=b1c180bbf5a130f10244807d809580345a363cce;hb=1eaf50a3d9f777b462ff1817678473567a00eb75;hpb=05c10141166b5b3870239c6b441fc157531b7d2e diff --git a/lightning-c-bindings/src/lightning/chain/chaininterface.rs b/lightning-c-bindings/src/lightning/chain/chaininterface.rs index b1c180b..7d8291d 100644 --- a/lightning-c-bindings/src/lightning/chain/chaininterface.rs +++ b/lightning-c-bindings/src/lightning/chain/chaininterface.rs @@ -12,11 +12,13 @@ //! Includes traits for monitoring and receiving notifications of new blocks and block //! disconnections, transaction broadcasting, and feerate information requests. -use std::str::FromStr; -use std::ffi::c_void; +use alloc::str::FromStr; +use core::ffi::c_void; use core::convert::Infallible; use bitcoin::hashes::Hash; use crate::c_types::*; +#[cfg(feature="no-std")] +use alloc::{vec::Vec, boxed::Box}; /// An interface to send a transaction to the Bitcoin network. #[repr(C)] @@ -50,7 +52,7 @@ impl rustBroadcasterInterface for BroadcasterInterface { // We're essentially a pointer already, or at least a set of pointers, so allow us to be used // directly as a Deref trait in higher-level structs: -impl std::ops::Deref for BroadcasterInterface { +impl core::ops::Deref for BroadcasterInterface { type Target = Self; fn deref(&self) -> &Self { self @@ -182,7 +184,7 @@ impl rustFeeEstimator for FeeEstimator { // We're essentially a pointer already, or at least a set of pointers, so allow us to be used // directly as a Deref trait in higher-level structs: -impl std::ops::Deref for FeeEstimator { +impl core::ops::Deref for FeeEstimator { type Target = Self; fn deref(&self) -> &Self { self