Bind to s instead of e
This error variant contains a string not an error type, bind to local variable `s` instead of `e` to make this explicit.
This commit is contained in:
parent
5c6d369289
commit
01f481bf5c
|
@ -96,7 +96,7 @@ impl fmt::Display for Error {
|
||||||
"invalid checksum: expected {}, actual {}", e.to_hex(), a.to_hex()),
|
"invalid checksum: expected {}, actual {}", e.to_hex(), a.to_hex()),
|
||||||
Error::NonMinimalVarInt => write!(f, "non-minimal varint"),
|
Error::NonMinimalVarInt => write!(f, "non-minimal varint"),
|
||||||
Error::UnknownNetworkMagic(ref m) => write!(f, "unknown network magic: {}", m),
|
Error::UnknownNetworkMagic(ref m) => write!(f, "unknown network magic: {}", m),
|
||||||
Error::ParseFailed(ref e) => write!(f, "parse failed: {}", e),
|
Error::ParseFailed(ref s) => write!(f, "parse failed: {}", s),
|
||||||
Error::UnsupportedSegwitFlag(ref swflag) => write!(f,
|
Error::UnsupportedSegwitFlag(ref swflag) => write!(f,
|
||||||
"unsupported segwit version: {}", swflag),
|
"unsupported segwit version: {}", swflag),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue