remove extraneous braces in ExecutionError Display impl
This commit is contained in:
parent
1251315b28
commit
6fb54f4c9d
@ -110,29 +110,18 @@ impl fmt::Display for ExecutionError {
|
|||||||
use self::ExecutionError::*;
|
use self::ExecutionError::*;
|
||||||
|
|
||||||
let msg = match *self {
|
let msg = match *self {
|
||||||
NotEnoughBaseGas { required, got } => {
|
NotEnoughBaseGas { required, got } =>
|
||||||
format!("Not enough base gas. {} is required, but only {} paid",
|
format!("Not enough base gas. {} is required, but only {} paid", required, got),
|
||||||
required, got)
|
BlockGasLimitReached { gas_limit, gas_used, gas } =>
|
||||||
}
|
|
||||||
BlockGasLimitReached { gas_limit, gas_used, gas } => {
|
|
||||||
format!("Block gas limit reached. The limit is {}, {} has \
|
format!("Block gas limit reached. The limit is {}, {} has \
|
||||||
already been used, and {} more is required",
|
already been used, and {} more is required", gas_limit, gas_used, gas),
|
||||||
gas_limit, gas_used, gas)
|
InvalidNonce { expected, got } =>
|
||||||
}
|
format!("Invalid transaction nonce: expected {}, found {}", expected, got),
|
||||||
InvalidNonce { expected, got } => {
|
NotEnoughCash { required, got } =>
|
||||||
format!("Invalid transaction nonce: expected {}, found {}",
|
|
||||||
expected, got)
|
|
||||||
}
|
|
||||||
NotEnoughCash { required, got } => {
|
|
||||||
format!("Cost of transaction exceeds sender balance. {} is required \
|
format!("Cost of transaction exceeds sender balance. {} is required \
|
||||||
but the sender only has {}", required, got)
|
but the sender only has {}", required, got),
|
||||||
}
|
Internal => "Internal evm error".into(),
|
||||||
Internal => {
|
TransactionMalformed(ref err) => format!("Malformed transaction: {}", err),
|
||||||
"Internal evm error".into()
|
|
||||||
}
|
|
||||||
TransactionMalformed(ref err) => {
|
|
||||||
format!("Malformed transaction: {}", err)
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
f.write_fmt(format_args!("Transaction execution error ({}).", msg))
|
f.write_fmt(format_args!("Transaction execution error ({}).", msg))
|
||||||
|
Loading…
Reference in New Issue
Block a user