@@ -71,7 +71,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref> Router for DefaultR
71
71
72
72
find_route (
73
73
payer, params, & self . network_graph , first_hops, & * self . logger ,
74
- & ScorerAccountingForInFlightHtlcs :: new ( & mut self . scorer . lock ( ) , inflight_htlcs) ,
74
+ & ScorerAccountingForInFlightHtlcs :: new ( self . scorer . lock ( ) , inflight_htlcs) ,
75
75
& random_seed_bytes
76
76
)
77
77
}
@@ -125,15 +125,15 @@ pub trait Router {
125
125
/// [`find_route`].
126
126
///
127
127
/// [`Score`]: crate::routing::scoring::Score
128
- pub struct ScorerAccountingForInFlightHtlcs < ' a , S : Score > {
129
- scorer : & ' a mut S ,
128
+ pub struct ScorerAccountingForInFlightHtlcs < S : Score > {
129
+ scorer : S ,
130
130
// Maps a channel's short channel id and its direction to the liquidity used up.
131
131
inflight_htlcs : InFlightHtlcs ,
132
132
}
133
133
134
- impl < ' a , S : Score > ScorerAccountingForInFlightHtlcs < ' a , S > {
134
+ impl < S : Score > ScorerAccountingForInFlightHtlcs < S > {
135
135
/// Initialize a new `ScorerAccountingForInFlightHtlcs`.
136
- pub fn new ( scorer : & ' a mut S , inflight_htlcs : InFlightHtlcs ) -> Self {
136
+ pub fn new ( scorer : S , inflight_htlcs : InFlightHtlcs ) -> Self {
137
137
ScorerAccountingForInFlightHtlcs {
138
138
scorer,
139
139
inflight_htlcs
@@ -142,11 +142,11 @@ impl<'a, S: Score> ScorerAccountingForInFlightHtlcs<'a, S> {
142
142
}
143
143
144
144
#[ cfg( c_bindings) ]
145
- impl < ' a , S : Score > Writeable for ScorerAccountingForInFlightHtlcs < ' a , S > {
145
+ impl < S : Score > Writeable for ScorerAccountingForInFlightHtlcs < S > {
146
146
fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > { self . scorer . write ( writer) }
147
147
}
148
148
149
- impl < ' a , S : Score > Score for ScorerAccountingForInFlightHtlcs < ' a , S > {
149
+ impl < S : Score > Score for ScorerAccountingForInFlightHtlcs < S > {
150
150
fn channel_penalty_msat ( & self , short_channel_id : u64 , source : & NodeId , target : & NodeId , usage : ChannelUsage ) -> u64 {
151
151
if let Some ( used_liquidity) = self . inflight_htlcs . used_liquidity_msat (
152
152
source, target, short_channel_id
0 commit comments