Drop one unnecessary allocation added in aa2f6b47df

In aa2f6b47df 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.
This commit is contained in:
Matt Corallo 2024-10-03 16:54:03 +00:00
parent cc72f032dc
commit 0abf068ad1

View file

@ -58,7 +58,7 @@ mod sealed {
let parsed = CheckedHrpstring::new::<NoChecksum>(encoded.as_ref())?;
let hrp = parsed.hrp();
if hrp.to_string() != Self::BECH32_HRP {
if hrp.as_str() != Self::BECH32_HRP {
return Err(Bolt12ParseError::InvalidBech32Hrp);
}