Bind to b instead of e

This error variant contains a byte value not an error type, bind to
local variable `b` instead of `e` to make this explicit.
This commit is contained in:
Tobin C. Harding 2022-05-25 12:41:31 +10:00
parent 01f481bf5c
commit 241ec72497
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ impl fmt::Display for Error {
match *self { match *self {
Error::Base58(ref e) => write!(f, "Key base58 error: {}", e), Error::Base58(ref e) => write!(f, "Key base58 error: {}", e),
Error::Secp256k1(ref e) => write!(f, "Key secp256k1 error: {}", e), Error::Secp256k1(ref e) => write!(f, "Key secp256k1 error: {}", e),
Error::InvalidKeyPrefix(ref e) => write!(f, "Key prefix invalid: {}", e), Error::InvalidKeyPrefix(ref b) => write!(f, "key prefix invalid: {}", b),
Error::Hex(ref e) => write!(f, "Key hex decoding error: {}", e) Error::Hex(ref e) => write!(f, "Key hex decoding error: {}", e)
} }
} }