Skip to content

Commit 9d431ea

Browse files
committed
simln-lib/chore: fix clippy reported errors
1 parent 2efff33 commit 9d431ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

simln-lib/src/lnd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl LightningNode for LndNode {
157157
dest_custom_records,
158158
payment_hash,
159159
timeout_seconds: SEND_PAYMENT_TIMEOUT_SECS,
160-
fee_limit_msat: i64::max_value(),
160+
fee_limit_msat: i64::MAX,
161161
..Default::default()
162162
})
163163
.await

simln-lib/src/sim_node.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl ChannelState {
236236
/// reported.
237237
fn add_outgoing_htlc(&mut self, hash: PaymentHash, htlc: Htlc) -> Result<(), ForwardingError> {
238238
self.check_outgoing_addition(&htlc)?;
239-
if self.in_flight.get(&hash).is_some() {
239+
if self.in_flight.contains_key(&hash) {
240240
return Err(ForwardingError::PaymentHashExists(hash));
241241
}
242242
self.local_balance_msat -= htlc.amount_msat;
@@ -704,7 +704,7 @@ impl SimGraph {
704704
}
705705

706706
/// Produces a map of node public key to lightning node implementation to be used for simulations.
707-
pub async fn ln_node_from_graph<'a>(
707+
pub async fn ln_node_from_graph(
708708
graph: Arc<Mutex<SimGraph>>,
709709
routing_graph: Arc<NetworkGraph<&'_ WrappedLog>>,
710710
) -> HashMap<PublicKey, Arc<Mutex<dyn LightningNode + '_>>> {
@@ -1560,7 +1560,7 @@ mod tests {
15601560
shutdown: triggered::Trigger,
15611561
}
15621562

1563-
impl<'a> DispatchPaymentTestKit<'a> {
1563+
impl DispatchPaymentTestKit<'_> {
15641564
/// Creates a test graph with a set of nodes connected by three channels, with all the capacity of the channel
15651565
/// on the side of the first node. For example, if called with capacity = 100 it will set up the following
15661566
/// network:

0 commit comments

Comments
 (0)