Skip to content

Commit bb38ed3

Browse files
authored
Merge pull request #2262 from Kixunil/remove-serde-error-allocation
Remove unneeded allocation
2 parents 56b0c96 + 6964299 commit bb38ed3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning-invoice/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,7 @@ impl<'de> Deserialize<'de> for Invoice {
17251725
fn deserialize<D>(deserializer: D) -> Result<Invoice, D::Error> where D: Deserializer<'de> {
17261726
let bolt11 = String::deserialize(deserializer)?
17271727
.parse::<Invoice>()
1728-
.map_err(|e| D::Error::custom(alloc::format!("{:?}", e)))?;
1728+
.map_err(|e| D::Error::custom(format_args!("{:?}", e)))?;
17291729

17301730
Ok(bolt11)
17311731
}

0 commit comments

Comments
 (0)