in src/error.rs [29:52]
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
DecodingError::ExceedMaxHeight => {
write!(
f,
"The height exceeds the maximum height, {}, in an SMT.",
MAX_HEIGHT
)?;
}
DecodingError::IndexOverflow => {
write!(f, "Index Overflow")?;
}
DecodingError::TooManyEncodedBytes => {
write!(f, "Too many encoded bytes than required")?;
}
DecodingError::BytesNotEnough => {
write!(f, "Bytes are not enough for decoding.")?;
}
DecodingError::ValueDecodingError { msg } => {
write!(f, "Value decoding error: {}", msg)?;
}
}
Ok(())
}