]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix compiling lightning-invoice for no-std + serde
authorbenthecarman <benthecarman@live.com>
Sat, 15 Apr 2023 20:38:53 +0000 (15:38 -0500)
committerbenthecarman <benthecarman@live.com>
Sat, 15 Apr 2023 20:38:53 +0000 (15:38 -0500)
lightning-invoice/src/lib.rs

index e9565f4ce30d26af2cb85d104c46c5faef4babd9..8426db37c6481e03c16ea50f921d29634a47ec0b 100644 (file)
@@ -1648,7 +1648,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(format!("{:?}", e)))?;
+                       .map_err(|e| D::Error::custom(alloc::format!("{:?}", e)))?;
 
                Ok(bolt11)
        }