doki_error/error_3rd/for_num.rs
1use crate::DokiError;
2use num::{bigint::TryFromBigIntError, BigInt};
3use rust_decimal::Error;
4
5impl From<TryFromBigIntError<BigInt>> for DokiError {
6 fn from(e: TryFromBigIntError<BigInt>) -> Self {
7 Self::runtime_error(format!("{}", e))
8 }
9}
10
11impl From<Error> for DokiError {
12 fn from(e: Error) -> Self {
13 Self::runtime_error(format!("{}", e))
14 }
15}