X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fmsgs.rs;fp=lightning%2Fsrc%2Fln%2Fmsgs.rs;h=bd5d23504b19961b63224c301853ce26971fd68e;hb=1fc6d6b5ee2451862768979399e381611ef00565;hp=24e8120de6cc4e14c32fd07d95903621b1f9a2eb;hpb=bb369b5c18084323b6e34fa5a2cd72ecb4ada8ea;p=rust-lightning diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 24e8120d..bd5d2350 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -461,7 +461,7 @@ pub enum ErrorAction { /// An Err type for failure to process messages. pub struct LightningError { /// A human-readable message describing the error - pub err: &'static str, + pub err: String, /// The action which should be taken against the offending peer. pub action: ErrorAction, } @@ -701,7 +701,7 @@ impl fmt::Display for DecodeError { impl fmt::Debug for LightningError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(self.err) + f.write_str(self.err.as_str()) } }