From 596e5e2440df2d32f1cf3e052dc633e774edf6ee Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 29 Mar 2026 21:48:23 +0800 Subject: Rename mingling to mingling_core and update dependencies --- mingling/src/program/exec/error.rs | 46 -------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 mingling/src/program/exec/error.rs (limited to 'mingling/src/program/exec/error.rs') diff --git a/mingling/src/program/exec/error.rs b/mingling/src/program/exec/error.rs deleted file mode 100644 index fe66e22..0000000 --- a/mingling/src/program/exec/error.rs +++ /dev/null @@ -1,46 +0,0 @@ -use crate::error::ChainProcessError; - -#[derive(thiserror::Error, Debug)] -pub enum ProgramExecuteError { - #[error("No Dispatcher Found")] - DispatcherNotFound, - - #[error("Other error: {0}")] - Other(String), -} - -#[derive(thiserror::Error, Debug)] -pub enum ProgramInternalExecuteError { - #[error("No Dispatcher Found")] - DispatcherNotFound, - - #[error("Other error: {0}")] - Other(String), - - #[error("IO error: {0}")] - IO(#[from] std::io::Error), -} - -impl From for ProgramExecuteError { - fn from(value: ProgramInternalExecuteError) -> Self { - match value { - ProgramInternalExecuteError::DispatcherNotFound => { - ProgramExecuteError::DispatcherNotFound - } - ProgramInternalExecuteError::Other(s) => ProgramExecuteError::Other(s), - ProgramInternalExecuteError::IO(e) => ProgramExecuteError::Other(format!("{}", e)), - } - } -} - -impl From for ProgramInternalExecuteError { - fn from(value: ChainProcessError) -> Self { - match value { - ChainProcessError::Other(s) => ProgramInternalExecuteError::Other(s), - ChainProcessError::IO(error) => ProgramInternalExecuteError::IO(error), - ChainProcessError::Broken(_) => { - ProgramInternalExecuteError::Other("Broken".to_string()) - } - } - } -} -- cgit