From 01f481bf5c7d8729fc23e2e62d631a70cae1391a Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 25 May 2022 12:33:56 +1000 Subject: [PATCH] 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. --- src/consensus/encode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/consensus/encode.rs b/src/consensus/encode.rs index 6505df37..6db2fe4f 100644 --- a/src/consensus/encode.rs +++ b/src/consensus/encode.rs @@ -96,7 +96,7 @@ impl fmt::Display for Error { "invalid checksum: expected {}, actual {}", e.to_hex(), a.to_hex()), Error::NonMinimalVarInt => write!(f, "non-minimal varint"), 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, "unsupported segwit version: {}", swflag), }