]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix redundant import warning in BP's `futures`
authorElias Rohrer <dev@tnull.de>
Tue, 12 Dec 2023 16:46:57 +0000 (17:46 +0100)
committerElias Rohrer <dev@tnull.de>
Mon, 18 Dec 2023 07:53:27 +0000 (08:53 +0100)
lightning-background-processor/src/lib.rs

index a12ec9c0f3b8b85a868e9f2e3fa05f0abc460b3d..0f2c67538d65de59acb37da608ca0f48da78f227 100644 (file)
@@ -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));