]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Reorganize #[cfg(not(c_bindings))] imports
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 4 Jan 2024 23:39:18 +0000 (17:39 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 16 Jan 2024 17:12:36 +0000 (11:12 -0600)
lightning/src/ln/peer_handler.rs
lightning/src/onion_message/messenger.rs

index 9a9aea9ae971e2ef727431795e47be35ca70b890..efc5a970e444f94c4d4b5845c2ecbaa06d91566a 100644 (file)
@@ -24,14 +24,10 @@ use crate::ln::ChannelId;
 use crate::ln::features::{InitFeatures, NodeFeatures};
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, LightningError, SocketAddress, OnionMessageHandler, RoutingMessageHandler};
-#[cfg(not(c_bindings))]
-use crate::ln::channelmanager::{SimpleArcChannelManager, SimpleRefChannelManager};
 use crate::util::ser::{VecWriter, Writeable, Writer};
 use crate::ln::peer_channel_encryptor::{PeerChannelEncryptor, NextNoiseStep, MessageBuf, MSG_BUF_ALLOC_SIZE};
 use crate::ln::wire;
 use crate::ln::wire::{Encode, Type};
-#[cfg(not(c_bindings))]
-use crate::onion_message::messenger::{SimpleArcOnionMessenger, SimpleRefOnionMessenger};
 use crate::onion_message::messenger::{CustomOnionMessageHandler, PendingOnionMessage};
 use crate::onion_message::offers::{OffersMessage, OffersMessageHandler};
 use crate::onion_message::packet::OnionMessageContents;
@@ -52,6 +48,8 @@ use core::convert::Infallible;
 use std::error;
 #[cfg(not(c_bindings))]
 use {
+       crate::ln::channelmanager::{SimpleArcChannelManager, SimpleRefChannelManager},
+       crate::onion_message::messenger::{SimpleArcOnionMessenger, SimpleRefOnionMessenger},
        crate::routing::gossip::{NetworkGraph, P2PGossipSync},
        crate::sign::KeysManager,
        crate::sync::Arc,
index 350fed49dbe19ee51c234915e823063a3ae8f387..3678dea84d6df869297eb8be87c355055501504b 100644 (file)
@@ -20,8 +20,6 @@ use crate::blinded_path::message::{advance_path_by_one, ForwardTlvs, ReceiveTlvs
 use crate::blinded_path::utils;
 use crate::events::{Event, EventHandler, EventsProvider};
 use crate::sign::{EntropySource, NodeSigner, Recipient};
-#[cfg(not(c_bindings))]
-use crate::ln::channelmanager::{SimpleArcChannelManager, SimpleRefChannelManager};
 use crate::ln::features::{InitFeatures, NodeFeatures};
 use crate::ln::msgs::{self, OnionMessage, OnionMessageHandler, SocketAddress};
 use crate::ln::onion_utils;
@@ -42,6 +40,7 @@ use crate::prelude::*;
 #[cfg(not(c_bindings))]
 use {
        crate::sign::KeysManager,
+       crate::ln::channelmanager::{SimpleArcChannelManager, SimpleRefChannelManager},
        crate::ln::peer_handler::IgnoringMessageHandler,
        crate::sync::Arc,
 };