@@ -754,6 +754,7 @@ pub async fn process_events_async<
754
754
Sleeper : Fn ( Duration ) -> SleepFuture ,
755
755
FetchTime : Fn ( ) -> Option < Duration > ,
756
756
> (
757
+ #[ rustfmt:: skip]
757
758
config : BackgroundProcessorConfig <
758
759
' a ,
759
760
UL ,
@@ -1083,6 +1084,7 @@ impl BackgroundProcessor {
1083
1084
S : ' static + Deref < Target = SC > + Send + Sync ,
1084
1085
SC : for < ' b > WriteableScore < ' b > ,
1085
1086
> (
1087
+ #[ rustfmt:: skip]
1086
1088
config : BackgroundProcessorConfig <
1087
1089
' a ,
1088
1090
UL ,
@@ -1272,7 +1274,7 @@ pub struct BackgroundProcessorConfig<
1272
1274
/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessorConfig`]
1273
1275
/// with optional components like `onion_messenger` and `scorer`. It helps avoid specifying
1274
1276
/// concrete types for components that aren't being used.
1275
- #[ cfg( feature = "std" ) ]
1277
+ #[ cfg( any ( feature = "std" , feature = "futures" ) ) ]
1276
1278
pub struct BackgroundProcessorConfigBuilder <
1277
1279
' a ,
1278
1280
UL : ' static + Deref + Send + Sync ,
@@ -1282,7 +1284,10 @@ pub struct BackgroundProcessorConfigBuilder<
1282
1284
G : ' static + Deref < Target = NetworkGraph < L > > + Send + Sync ,
1283
1285
L : ' static + Deref + Send + Sync ,
1284
1286
P : ' static + Deref + Send + Sync ,
1287
+ #[ cfg( feature = "std" ) ]
1285
1288
EH : ' static + EventHandler + Send ,
1289
+ #[ cfg( feature = "futures" ) ]
1290
+ EH : ' static + Fn ( Event ) -> core:: future:: Future < Output = Result < ( ) , ReplayEvent > > ,
1286
1291
PS : ' static + Deref + Send ,
1287
1292
M : ' static
1288
1293
+ Deref < Target = ChainMonitor < <CM :: Target as AChannelManager >:: Signer , CF , T , F , L , P > >
@@ -1319,7 +1324,7 @@ pub struct BackgroundProcessorConfigBuilder<
1319
1324
_phantom : PhantomData < ( & ' a ( ) , CF , T , F , P ) > ,
1320
1325
}
1321
1326
1322
- #[ cfg( feature = "std" ) ]
1327
+ #[ cfg( any ( feature = "std" , feature = "futures" ) ) ]
1323
1328
impl <
1324
1329
' a ,
1325
1330
UL : ' static + Deref + Send + Sync ,
@@ -1329,7 +1334,10 @@ impl<
1329
1334
G : ' static + Deref < Target = NetworkGraph < L > > + Send + Sync ,
1330
1335
L : ' static + Deref + Send + Sync ,
1331
1336
P : ' static + Deref + Send + Sync ,
1337
+ #[ cfg( feature = "std" ) ]
1332
1338
EH : ' static + EventHandler + Send ,
1339
+ #[ cfg( feature = "futures" ) ]
1340
+ EH : ' static + Fn ( Event ) -> core:: future:: Future < Output = Result < ( ) , ReplayEvent > > ,
1333
1341
PS : ' static + Deref + Send ,
1334
1342
M : ' static
1335
1343
+ Deref < Target = ChainMonitor < <CM :: Target as AChannelManager >:: Signer , CF , T , F , L , P > >
@@ -3196,7 +3204,7 @@ mod tests {
3196
3204
// Check scorer is persisted
3197
3205
let filepath =
3198
3206
get_full_filepath ( format ! ( "{}_persister_0" , & persist_dir) , "scorer" . to_string ( ) ) ;
3199
- check_persisted_data ! ( nodes[ 0 ] . scorer, filepath) ;
3207
+ check_persisted_data ! ( nodes[ 0 ] . scorer, filepath. clone ( ) ) ;
3200
3208
3201
3209
if !std:: thread:: panicking ( ) {
3202
3210
bg_processor. stop ( ) . unwrap ( ) ;
0 commit comments