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

@ -762,7 +762,7 @@ mod tests {
where
T: 'static + std::error::Error + DecodeError<T> + FromPrimitive,
{
if let InstructionError::CustomError(code) = err {
if let InstructionError::Custom(code) = err {
let specific_error: T = T::decode_custom_error_to_enum(code).unwrap();
format!(
"{:?}: {}::{:?} - {}",
@ -776,7 +776,7 @@ mod tests {
}
}
assert_eq!(
"CustomError(0): StakeError::NoCreditsToRedeem - not enough credits to redeem",
"Custom(0): StakeError::NoCreditsToRedeem - not enough credits to redeem",
pretty_err::<StakeError>(StakeError::NoCreditsToRedeem.into())
)
}