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::*;
|
||||
|
||||
let msg = match *self {
|
||||
NotEnoughBaseGas { required, got } => {
|
||||
format!("Not enough base gas. {} is required, but only {} paid",
|
||||
required, got)
|
||||
}
|
||||
BlockGasLimitReached { gas_limit, gas_used, gas } => {
|
||||
NotEnoughBaseGas { required, got } =>
|
||||
format!("Not enough base gas. {} is required, but only {} paid", required, got),
|
||||
BlockGasLimitReached { gas_limit, gas_used, gas } =>
|
||||
format!("Block gas limit reached. The limit is {}, {} has \
|
||||
already been used, and {} more is required",
|
||||
gas_limit, gas_used, gas)
|
||||
}
|
||||
InvalidNonce { expected, got } => {
|
||||
format!("Invalid transaction nonce: expected {}, found {}",
|
||||
expected, got)
|
||||
}
|
||||
NotEnoughCash { required, got } => {
|
||||
already been used, and {} more is required", gas_limit, gas_used, gas),
|
||||
InvalidNonce { expected, got } =>
|
||||
format!("Invalid transaction nonce: expected {}, found {}", expected, got),
|
||||
NotEnoughCash { required, got } =>
|
||||
format!("Cost of transaction exceeds sender balance. {} is required \
|
||||
but the sender only has {}", required, got)
|
||||
}
|
||||
Internal => {
|
||||
"Internal evm error".into()
|
||||
}
|
||||
TransactionMalformed(ref err) => {
|
||||
format!("Malformed transaction: {}", err)
|
||||
}
|
||||
but the sender only has {}", required, got),
|
||||
Internal => "Internal evm error".into(),
|
||||
TransactionMalformed(ref err) => format!("Malformed transaction: {}", err),
|
||||
};
|
||||
|
||||
f.write_fmt(format_args!("Transaction execution error ({}).", msg))
|
||||
|
Loading…
Reference in New Issue
Block a user