remove extraneous braces in ExecutionError Display impl

This commit is contained in:
Robert Habermeier 2016-05-22 12:47:42 -04:00
parent 1251315b28
commit 6fb54f4c9d

View File

@ -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))