From e1305031486d9b6f8010be10c2d0867cb37345a9 Mon Sep 17 00:00:00 2001 From: Will Koval Date: Wed, 27 Nov 2024 14:42:13 +0000 Subject: [PATCH] Added ParseIntError to IxaError --- src/error.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/error.rs b/src/error.rs index e4c9fec0..42a28c01 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,6 +10,7 @@ pub enum IxaError { JsonError(serde_json::Error), CsvError(csv::Error), Utf8Error(std::string::FromUtf8Error), + ParseIntError(std::num::ParseIntError), IxaError(String), } @@ -37,6 +38,12 @@ impl From for IxaError { } } +impl From for IxaError { + fn from(error: std::num::ParseIntError) -> Self { + IxaError::ParseIntError(error) + } +} + impl From for IxaError { fn from(error: String) -> Self { IxaError::IxaError(error)