use crate::util::ser::{HighZeroBytesDroppedBigSize, Readable, WithoutLength, Writeable, Writer};
use crate::util::string::UntrustedString;
+#[allow(unused_imports)]
use crate::prelude::*;
/// An error in response to an [`InvoiceRequest`] or an [`Bolt12Invoice`].
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),
}
}
}