Skip to content

Commit

Permalink
sim-lib/clippy: use contains_key
Browse files Browse the repository at this point in the history
  • Loading branch information
carlaKC committed May 15, 2024
1 parent 9b9424c commit f183751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sim-lib/src/sim_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl ChannelState {
/// reported.
fn add_outgoing_htlc(&mut self, hash: PaymentHash, htlc: Htlc) -> Result<(), ForwardingError> {
self.check_outgoing_addition(&htlc)?;
if self.in_flight.get(&hash).is_some() {
if self.in_flight.contains_key(&hash) {
return Err(ForwardingError::PaymentHashExists(hash));
}
self.local_balance_msat -= htlc.amount_msat;
Expand Down

0 comments on commit f183751

Please sign in to comment.