Rename CustomError to Custom (#9207)

This commit is contained in:
Jack May
2020-04-01 09:01:11 -07:00
committed by GitHub
parent 7605f1f540
commit 268e04cb4a
19 changed files with 59 additions and 79 deletions

View File

@@ -38,10 +38,10 @@ pub fn map_failure_error(err: failure::Error) -> InstructionError {
}
pub fn map_err_vm_status(status: VMStatus) -> InstructionError {
// Attempt to map the StatusCode (repr(u64)) to a u32 for CustomError.
// Attempt to map the StatusCode (repr(u64)) to a u32 for Custom.
// The only defined StatusCode that fails is StatusCode::UNKNOWN_ERROR
match <StatusCode as Into<u64>>::into(status.major_status).try_into() {
Ok(u) => InstructionError::CustomError(u),
Ok(u) => InstructionError::Custom(u),
Err(_) => InstructionError::InvalidError,
}
}