diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2026-05-31 02:42:52 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-31 17:19:20 +0800 |
| commit | 2aa7bda3cb21ce6c052b82e08bcab79a625d04f2 (patch) | |
| tree | f10b89007fc67ca1a948f34abe6869b49296b932 /mingling_core/src/program/exec | |
| parent | 3aa409a55e4f2f0ab41b0949cc06eb13c2da4a43 (diff) | |
Enhance code quality across the entire codebase
Diffstat (limited to 'mingling_core/src/program/exec')
| -rw-r--r-- | mingling_core/src/program/exec/error.rs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/mingling_core/src/program/exec/error.rs b/mingling_core/src/program/exec/error.rs index 0f2d875..944e89a 100644 --- a/mingling_core/src/program/exec/error.rs +++ b/mingling_core/src/program/exec/error.rs @@ -26,10 +26,10 @@ impl fmt::Display for ProgramExecuteError { match self { ProgramExecuteError::DispatcherNotFound => write!(f, "No Dispatcher Found"), ProgramExecuteError::RendererNotFound(s) => { - write!(f, "No Renderer (`{}`) Found", s) + write!(f, "No Renderer (`{s}`) Found") } - ProgramExecuteError::Panic(p) => write!(f, "Panic: {:?}", p), - ProgramExecuteError::Other(s) => write!(f, "Other error: {}", s), + ProgramExecuteError::Panic(p) => write!(f, "Panic: {p:?}"), + ProgramExecuteError::Other(s) => write!(f, "Other error: {s}"), } } } @@ -74,12 +74,12 @@ impl fmt::Display for ProgramInternalExecuteError { write!(f, "No Dispatcher Found") } ProgramInternalExecuteError::RendererNotFound(s) => { - write!(f, "No Renderer (`{}`) Found", s) + write!(f, "No Renderer (`{s}`) Found") } - ProgramInternalExecuteError::Other(s) => write!(f, "Other error: {}", s), - ProgramInternalExecuteError::IO(e) => write!(f, "IO error: {}", e), + ProgramInternalExecuteError::Other(s) => write!(f, "Other error: {s}"), + ProgramInternalExecuteError::IO(e) => write!(f, "IO error: {e}"), ProgramInternalExecuteError::REPLPanic(panic) => { - write!(f, "A single REPL execution failed: {}", panic) + write!(f, "A single REPL execution failed: {panic}") } } } @@ -110,11 +110,10 @@ impl From<ProgramInternalExecuteError> for ProgramExecuteError { ProgramExecuteError::RendererNotFound(s) } ProgramInternalExecuteError::Other(s) => ProgramExecuteError::Other(s), - ProgramInternalExecuteError::IO(e) => ProgramExecuteError::Other(format!("{}", e)), - ProgramInternalExecuteError::REPLPanic(p) => ProgramExecuteError::Other(format!( - "A single REPL execution failed: {}", - p - )), + ProgramInternalExecuteError::IO(e) => ProgramExecuteError::Other(format!("{e}")), + ProgramInternalExecuteError::REPLPanic(p) => { + ProgramExecuteError::Other(format!("A single REPL execution failed: {p}")) + } } } } |
