@@ -71,7 +71,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref> Router for DefaultR
7171
7272 find_route (
7373 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) ,
7575 & random_seed_bytes
7676 )
7777 }
@@ -125,15 +125,15 @@ pub trait Router {
125125/// [`find_route`].
126126///
127127/// [`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 ,
130130 // Maps a channel's short channel id and its direction to the liquidity used up.
131131 inflight_htlcs : InFlightHtlcs ,
132132}
133133
134- impl < ' a , S : Score > ScorerAccountingForInFlightHtlcs < ' a , S > {
134+ impl < S : Score > ScorerAccountingForInFlightHtlcs < S > {
135135 /// 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 {
137137 ScorerAccountingForInFlightHtlcs {
138138 scorer,
139139 inflight_htlcs
@@ -142,11 +142,11 @@ impl<'a, S: Score> ScorerAccountingForInFlightHtlcs<'a, S> {
142142}
143143
144144#[ cfg( c_bindings) ]
145- impl < ' a , S : Score > Writeable for ScorerAccountingForInFlightHtlcs < ' a , S > {
145+ impl < S : Score > Writeable for ScorerAccountingForInFlightHtlcs < S > {
146146 fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > { self . scorer . write ( writer) }
147147}
148148
149- impl < ' a , S : Score > Score for ScorerAccountingForInFlightHtlcs < ' a , S > {
149+ impl < S : Score > Score for ScorerAccountingForInFlightHtlcs < S > {
150150 fn channel_penalty_msat ( & self , short_channel_id : u64 , source : & NodeId , target : & NodeId , usage : ChannelUsage ) -> u64 {
151151 if let Some ( used_liquidity) = self . inflight_htlcs . used_liquidity_msat (
152152 source, target, short_channel_id
0 commit comments