Skip to content

Commit 0abf068

Browse files
committed
Drop one unnecessary allocation added in aa2f6b4
In aa2f6b4 we refactored `lightning-invoice` de/serialization to use the new version of `bech32`, but ended up adding one unnecessary allocation in our offers logic, which we drop here.
1 parent cc72f03 commit 0abf068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/offers/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mod sealed {
5858

5959
let parsed = CheckedHrpstring::new::<NoChecksum>(encoded.as_ref())?;
6060
let hrp = parsed.hrp();
61-
if hrp.to_string() != Self::BECH32_HRP {
61+
if hrp.as_str() != Self::BECH32_HRP {
6262
return Err(Bolt12ParseError::InvalidBech32Hrp);
6363
}
6464

0 commit comments

Comments
 (0)