Skip to content

Commit 683cb81

Browse files
committed
f Drop further Send + Sync bounds
1 parent 2372144 commit 683cb81

File tree

1 file changed

+15
-21
lines changed
  • lightning-background-processor/src

1 file changed

+15
-21
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,8 @@ impl<
223223
R: Deref<Target = RapidGossipSync<G, L>>,
224224
G: Deref<Target = NetworkGraph<L>>,
225225
L: Deref,
226-
>
227-
GossipSync<
228-
&P2PGossipSync<G, &'a (dyn UtxoLookup + Send + Sync), L>,
229-
R,
230-
G,
231-
&'a (dyn UtxoLookup + Send + Sync),
232-
L,
233-
> where
226+
> GossipSync<&P2PGossipSync<G, &'a (dyn UtxoLookup), L>, R, G, &'a (dyn UtxoLookup), L>
227+
where
234228
L::Target: Logger,
235229
{
236230
/// Initializes a new [`GossipSync::Rapid`] variant.
@@ -242,10 +236,10 @@ impl<
242236
/// This is not exported to bindings users as the bindings concretize everything and have constructors for us
243237
impl<'a, L: Deref>
244238
GossipSync<
245-
&P2PGossipSync<&'a NetworkGraph<L>, &'a (dyn UtxoLookup + Send + Sync), L>,
239+
&P2PGossipSync<&'a NetworkGraph<L>, &'a (dyn UtxoLookup), L>,
246240
&RapidGossipSync<&'a NetworkGraph<L>, L>,
247241
&'a NetworkGraph<L>,
248-
&'a (dyn UtxoLookup + Send + Sync),
242+
&'a (dyn UtxoLookup),
249243
L,
250244
> where
251245
L::Target: Logger,
@@ -271,7 +265,7 @@ where
271265

272266
/// Updates scorer based on event and returns whether an update occurred so we can decide whether
273267
/// to persist.
274-
fn update_scorer<'a, S: 'static + Deref<Target = SC> + Send + Sync, SC: 'a + WriteableScore<'a>>(
268+
fn update_scorer<'a, S: 'static + Deref<Target = SC>, SC: 'a + WriteableScore<'a>>(
275269
scorer: &'a S, event: &Event, duration_since_epoch: Duration,
276270
) -> bool {
277271
match event {
@@ -665,10 +659,10 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
665659
/// # type PeerManager<B, F, FE, UL> = lightning::ln::peer_handler::SimpleArcPeerManager<SocketDescriptor, ChainMonitor<B, F, FE>, B, FE, Arc<UL>, Logger>;
666660
/// #
667661
/// # struct Node<
668-
/// # B: lightning::chain::chaininterface::BroadcasterInterface + Send + Sync + 'static,
669-
/// # F: lightning::chain::Filter + Send + Sync + 'static,
670-
/// # FE: lightning::chain::chaininterface::FeeEstimator + Send + Sync + 'static,
671-
/// # UL: lightning::routing::utxo::UtxoLookup + Send + Sync + 'static,
662+
/// # B: lightning::chain::chaininterface::BroadcasterInterface + 'static,
663+
/// # F: lightning::chain::Filter + 'static,
664+
/// # FE: lightning::chain::chaininterface::FeeEstimator + 'static,
665+
/// # UL: lightning::routing::utxo::UtxoLookup + 'static,
672666
/// # > {
673667
/// # peer_manager: Arc<PeerManager<B, F, FE, UL>>,
674668
/// # event_handler: Arc<EventHandler>,
@@ -683,10 +677,10 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
683677
/// # }
684678
/// #
685679
/// # async fn setup_background_processing<
686-
/// # B: lightning::chain::chaininterface::BroadcasterInterface + Send + Sync + 'static,
687-
/// # F: lightning::chain::Filter + Send + Sync + 'static,
688-
/// # FE: lightning::chain::chaininterface::FeeEstimator + Send + Sync + 'static,
689-
/// # UL: lightning::routing::utxo::UtxoLookup + Send + Sync + 'static,
680+
/// # B: lightning::chain::chaininterface::BroadcasterInterface + 'static,
681+
/// # F: lightning::chain::Filter + 'static,
682+
/// # FE: lightning::chain::chaininterface::FeeEstimator + 'static,
683+
/// # UL: lightning::routing::utxo::UtxoLookup + 'static,
690684
/// # >(node: Node<B, F, FE, UL>) {
691685
/// let background_persister = Arc::clone(&node.persister);
692686
/// let background_event_handler = Arc::clone(&node.event_handler);
@@ -770,7 +764,7 @@ pub async fn process_events_async<
770764
RGS: 'static + Deref<Target = RapidGossipSync<G, L>>,
771765
PM: 'static + Deref,
772766
LM: 'static + Deref,
773-
S: 'static + Deref<Target = SC> + Send + Sync,
767+
S: 'static + Deref<Target = SC> + Sync,
774768
SC: for<'b> WriteableScore<'b>,
775769
SleepFuture: core::future::Future<Output = bool> + core::marker::Unpin,
776770
Sleeper: Fn(Duration) -> SleepFuture,
@@ -938,7 +932,7 @@ impl BackgroundProcessor {
938932
UL: 'static + Deref,
939933
CF: 'static + Deref,
940934
T: 'static + Deref,
941-
F: 'static + Deref + Send,
935+
F: 'static + Deref,
942936
G: 'static + Deref<Target = NetworkGraph<L>>,
943937
L: 'static + Deref + Send,
944938
P: 'static + Deref,

0 commit comments

Comments
 (0)