From: Elias Rohrer Date: Tue, 12 Dec 2023 16:46:57 +0000 (+0100) Subject: Fix redundant import warning in BP's `futures` X-Git-Tag: v0.0.120~20^2~8 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=e76ad1a24547d94cae6933128ea4a0baaaf5b3d4;p=rust-lightning Fix redundant import warning in BP's `futures` --- diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index a12ec9c0f..0f2c67538 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -27,7 +27,10 @@ use lightning::chain::chainmonitor::{ChainMonitor, Persist}; use lightning::sign::{EntropySource, NodeSigner, SignerProvider}; use lightning::events::{Event, PathFailure}; #[cfg(feature = "std")] -use lightning::events::{EventHandler, EventsProvider}; +use lightning::events::EventHandler; +#[cfg(any(feature = "std", feature = "futures"))] +use lightning::events::EventsProvider; + use lightning::ln::channelmanager::ChannelManager; use lightning::ln::msgs::OnionMessageHandler; use lightning::ln::peer_handler::APeerManager; @@ -727,8 +730,6 @@ async fn process_onion_message_handler_events_async< where PM::Target: APeerManager + Send + Sync, { - use lightning::events::EventsProvider; - let events = core::cell::RefCell::new(Vec::new()); peer_manager.onion_message_handler().process_pending_events(&|e| events.borrow_mut().push(e));