Merge pull request #2196 from wpaulino/ci-ignore-master-cancel-prev
[rust-lightning] / lightning-invoice / src / lib.rs
index e9565f4ce30d26af2cb85d104c46c5faef4babd9..94a93fe62b7f1d160c5f1dc0c89ba66b56bf34c1 100644 (file)
@@ -1360,6 +1360,8 @@ impl Invoice {
        }
 
        /// Returns the network for which the invoice was issued
+       ///
+       /// This is not exported to bindings users, see [`Self::currency`] instead.
        pub fn network(&self) -> Network {
                self.signed_invoice.currency().into()
        }
@@ -1648,7 +1650,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)
        }