From b80cfeed8524ae13ce6ecefbec65328bec708945 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 26 May 2022 10:05:05 +1000 Subject: [PATCH] Bind to error_kind instead of e To make it explicit that this is not an error bind to the local variable `error_kind` instead of `e`. --- src/util/sighash.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/sighash.rs b/src/util/sighash.rs index 63b1a147..3cf48908 100644 --- a/src/util/sighash.rs +++ b/src/util/sighash.rs @@ -211,7 +211,7 @@ pub enum Error { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - Error::Io(ref e) => write!(f, "Writer errored: {:?}", e), + Error::Io(error_kind) => write!(f, "writer errored: {:?}", error_kind), Error::IndexOutOfInputsBounds { index, inputs_size } => write!(f, "Requested index ({}) is greater or equal than the number of transaction inputs ({})", index, inputs_size), Error::SingleWithoutCorrespondingOutput { index, outputs_size } => write!(f, "SIGHASH_SINGLE for input ({}) haven't a corresponding output (#outputs:{})", index, outputs_size), Error::PrevoutsSize => write!(f, "Number of supplied prevouts differs from the number of inputs in transaction"),