X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Finvoice_error.rs;h=5476ad551b7b627d5e1abac8d19fc836b673e54c;hb=b1ad95158e8cea0119df31fb5318a31fcc70e927;hp=441dae265cbb4fb9c9ed8d527e6b9b65c1e61ad1;hpb=be8797e17ab5c56582340d1f5e57f92477ede69d;p=rust-lightning diff --git a/lightning/src/offers/invoice_error.rs b/lightning/src/offers/invoice_error.rs index 441dae26..5476ad55 100644 --- a/lightning/src/offers/invoice_error.rs +++ b/lightning/src/offers/invoice_error.rs @@ -50,10 +50,10 @@ pub struct ErroneousField { impl InvoiceError { /// Creates an [`InvoiceError`] with the given message. - pub fn from_str(s: &str) -> Self { + pub fn from_string(s: String) -> Self { Self { erroneous_field: None, - message: UntrustedString(s.to_string()), + message: UntrustedString(s), } } }