projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
56b0c96
)
Merge pull request #2262 from Kixunil/remove-serde-error-allocation
author
Wilmer Paulino
<9447167+wpaulino@users.noreply.github.com>
Thu, 4 May 2023 17:30:32 +0000
(10:30 -0700)
committer
GitHub
<noreply@github.com>
Thu, 4 May 2023 17:30:32 +0000
(10:30 -0700)
Remove unneeded allocation
lightning-invoice/src/lib.rs
patch
|
blob
|
history
diff --git
a/lightning-invoice/src/lib.rs
b/lightning-invoice/src/lib.rs
index 101051b5e7f23509325d42301a424d3045fc7589..f53c8953b47c66b9344d86a928d9e834790989f7 100644
(file)
--- a/
lightning-invoice/src/lib.rs
+++ b/
lightning-invoice/src/lib.rs
@@
-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)
}