]> git.bitcoin.ninja Git - rust-lightning/commit
Use HashMap::entry instead of HashMap::insert
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 24 May 2024 16:31:30 +0000 (11:31 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 24 May 2024 16:31:30 +0000 (11:31 -0500)
commit3ab45d82d1cd05691fe36d11b888b08bd58b4feb
tree0c508a62ff1762bc2cd24e906ca60a7c91b757b4
parent101af715153ac9cbd21968b7baab49916fe65000
Use HashMap::entry instead of HashMap::insert

This allows for obtaining the value without needing to re-look it up. An
upcoming commit will include RecipientOnionFields in the inserted value.
Having it available afterwards prevents needing to clone it.
lightning/src/ln/channelmanager.rs