mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 15:02:20 +01:00
Merge pull request #2262 from Kixunil/remove-serde-error-allocation
Remove unneeded allocation
This commit is contained in:
commit
bb38ed3b2e
1 changed files with 1 additions and 1 deletions
|
@ -1725,7 +1725,7 @@ impl<'de> Deserialize<'de> for Invoice {
|
|||
fn deserialize<D>(deserializer: D) -> Result<Invoice, D::Error> where D: Deserializer<'de> {
|
||||
let bolt11 = String::deserialize(deserializer)?
|
||||
.parse::<Invoice>()
|
||||
.map_err(|e| D::Error::custom(alloc::format!("{:?}", e)))?;
|
||||
.map_err(|e| D::Error::custom(format_args!("{:?}", e)))?;
|
||||
|
||||
Ok(bolt11)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue