@@ -668,7 +668,7 @@ use futures_util::{Joiner, OptionalSelector, Selector, SelectorOutput};
668
668
#[ cfg_attr( feature = "std" , doc = "" ) ]
669
669
/// let sleeper = move |d| {
670
670
#[ cfg_attr( feature = "std" , doc = " let mut receiver = stop_receiver.clone();" ) ]
671
- /// Box ::pin(async move {
671
+ /// core ::pin::pin! (async move {
672
672
/// tokio::select!{
673
673
/// _ = tokio::time::sleep(d) => false,
674
674
#[ cfg_attr( feature = "std" , doc = " _ = receiver.changed() => true," ) ]
@@ -769,7 +769,6 @@ where
769
769
let logger = & logger;
770
770
let kv_store = & kv_store;
771
771
let fetch_time = & fetch_time;
772
- // We should be able to drop the Box once our MSRV is 1.68
773
772
Box :: pin ( async move {
774
773
if let Some ( network_graph) = network_graph {
775
774
handle_network_graph_update ( network_graph, & event)
@@ -923,7 +922,6 @@ where
923
922
)
924
923
. await
925
924
} ;
926
- // TODO: Once our MSRV is 1.68 we should be able to drop the Box
927
925
let mut fut = Box :: pin ( fut) ;
928
926
929
927
// Because persisting the ChannelManager is important to avoid accidental
@@ -992,7 +990,6 @@ where
992
990
Ok ( ( ) )
993
991
} ;
994
992
995
- // TODO: Once our MSRV is 1.68 we should be able to drop the Box
996
993
futures. set_b ( Box :: pin ( fut) ) ;
997
994
998
995
have_pruned = true ;
@@ -1038,7 +1035,6 @@ where
1038
1035
Ok ( ( ) )
1039
1036
} ;
1040
1037
1041
- // TODO: Once our MSRV is 1.68 we should be able to drop the Box
1042
1038
futures. set_c ( Box :: pin ( fut) ) ;
1043
1039
}
1044
1040
} ,
@@ -1055,7 +1051,6 @@ where
1055
1051
Ok ( ( ) )
1056
1052
} ;
1057
1053
1058
- // TODO: Once our MSRV is 1.68 we should be able to drop the Box
1059
1054
futures. set_d ( Box :: pin ( fut) ) ;
1060
1055
}
1061
1056
} ,
@@ -2616,7 +2611,7 @@ mod tests {
2616
2611
Arc :: clone ( & nodes[ 0 ] . logger ) ,
2617
2612
Some ( Arc :: clone ( & nodes[ 0 ] . scorer ) ) ,
2618
2613
move |dur : Duration | {
2619
- Box :: pin ( async move {
2614
+ core :: pin:: pin! ( async move {
2620
2615
tokio:: time:: sleep( dur) . await ;
2621
2616
false // Never exit
2622
2617
} )
@@ -3126,7 +3121,7 @@ mod tests {
3126
3121
Some ( Arc :: clone ( & nodes[ 0 ] . scorer ) ) ,
3127
3122
move |dur : Duration | {
3128
3123
let mut exit_receiver = exit_receiver. clone ( ) ;
3129
- Box :: pin ( async move {
3124
+ core :: pin:: pin! ( async move {
3130
3125
tokio:: select! {
3131
3126
_ = tokio:: time:: sleep( dur) => false ,
3132
3127
_ = exit_receiver. changed( ) => true ,
@@ -3341,7 +3336,7 @@ mod tests {
3341
3336
Some ( Arc :: clone ( & nodes[ 0 ] . scorer ) ) ,
3342
3337
move |dur : Duration | {
3343
3338
let mut exit_receiver = exit_receiver. clone ( ) ;
3344
- Box :: pin ( async move {
3339
+ core :: pin:: pin! ( async move {
3345
3340
tokio:: select! {
3346
3341
_ = tokio:: time:: sleep( dur) => false ,
3347
3342
_ = exit_receiver. changed( ) => true ,
0 commit comments