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`.
This commit is contained in:
Tobin C. Harding 2022-05-26 10:05:05 +10:00
parent 241ec72497
commit b80cfeed85
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ pub enum Error {
impl fmt::Display for Error { impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self { 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::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::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"), Error::PrevoutsSize => write!(f, "Number of supplied prevouts differs from the number of inputs in transaction"),