This required that the code being run in the benchmark be tested to verify it works correctly. Now work can begin cleaning up and optimizing state-res.
24 lines
638 B
Rust
24 lines
638 B
Rust
use std::num::ParseIntError;
|
|
|
|
use serde_json::Error as JsonError;
|
|
use thiserror::Error;
|
|
|
|
/// Result type for state resolution.
|
|
pub type Result<T> = std::result::Result<T, Error>;
|
|
|
|
/// Represents the various errors that arise when resolving state.
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
/// A deserialization error.
|
|
#[error(transparent)]
|
|
SerdeJson(#[from] JsonError),
|
|
|
|
/// An error that occurs when converting from JSON numbers to rust.
|
|
#[error(transparent)]
|
|
IntParseError(#[from] ParseIntError),
|
|
|
|
// TODO remove once the correct errors are used
|
|
#[error("an error occured {0}")]
|
|
TempString(String),
|
|
}
|