Skip to content

Commit a863cfd

Browse files
committed
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`.
1 parent 311a963 commit a863cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/sighash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub enum Error {
211211
impl fmt::Display for Error {
212212
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
213213
match self {
214-
Error::Io(ref e) => write!(f, "Writer errored: {:?}", e),
214+
Error::Io(error_kind) => write!(f, "writer errored: {:?}", error_kind),
215215
Error::IndexOutOfInputsBounds { index, inputs_size } => write!(f, "Requested index ({}) is greater or equal than the number of transaction inputs ({})", index, inputs_size),
216216
Error::SingleWithoutCorrespondingOutput { index, outputs_size } => write!(f, "SIGHASH_SINGLE for input ({}) haven't a corresponding output (#outputs:{})", index, outputs_size),
217217
Error::PrevoutsSize => write!(f, "Number of supplied prevouts differs from the number of inputs in transaction"),

0 commit comments

Comments
 (0)