diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-06 23:16:51 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-06 23:16:51 +0800 |
| commit | 81635b93c597b10282cb14e0873f5e3d22395186 (patch) | |
| tree | 200fd2632653fefe751ab5bfa6ebc7a8d4161638 /mingling_core/src/program | |
| parent | a16d1e6f204cc83104ad3dcc4f4266e304214044 (diff) | |
Rename `ExitCode` to `ResExitCode` and `REPL` to `ResREPL`
Diffstat (limited to 'mingling_core/src/program')
| -rw-r--r-- | mingling_core/src/program/repl_exec.rs | 10 | ||||
| -rw-r--r-- | mingling_core/src/program/repl_exec/res.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/mingling_core/src/program/repl_exec.rs b/mingling_core/src/program/repl_exec.rs index 033c5a3..d6b3f00 100644 --- a/mingling_core/src/program/repl_exec.rs +++ b/mingling_core/src/program/repl_exec.rs @@ -11,7 +11,7 @@ mod splitter; use crate::error::{ProgramInternalExecuteError, ProgramPanic}; use crate::program::repl_exec::splitter::split_input_string; use crate::{Program, ProgramCollect, RenderResult}; -use crate::{program::repl_exec::res::REPL, this}; +use crate::{program::repl_exec::res::ResREPL, this}; #[cfg(not(feature = "async"))] impl<C> Program<C> @@ -24,7 +24,7 @@ where /// and displays the execution result or error message. It is suitable for scenarios requiring command-line interaction with the user. pub fn exec_repl(mut self) { // Inject default REPL resource - self.with_resource(REPL::default()); + self.with_resource(ResREPL::default()); self.run_hook_repl_on_begin(); @@ -48,7 +48,7 @@ where } p.run_hook_repl_post_exec(); - if this::<C>().res::<REPL>().unwrap().exit { + if this::<C>().res::<ResREPL>().unwrap().exit { p.run_hook_repl_exit(); break; } @@ -73,7 +73,7 @@ where /// Any panics during command execution will result in an abort rather than being caught and handled gracefully. pub async fn exec_repl(mut self) { // Inject default REPL resource - self.with_resource(REPL::default()); + self.with_resource(ResREPL::default()); self.run_hook_repl_on_begin(); @@ -94,7 +94,7 @@ where } p.run_hook_repl_post_exec(); - if this::<C>().res::<REPL>().unwrap().exit { + if this::<C>().res::<ResREPL>().unwrap().exit { p.run_hook_repl_exit(); break; } diff --git a/mingling_core/src/program/repl_exec/res.rs b/mingling_core/src/program/repl_exec/res.rs index 1295652..53e82d8 100644 --- a/mingling_core/src/program/repl_exec/res.rs +++ b/mingling_core/src/program/repl_exec/res.rs @@ -1,6 +1,6 @@ /// Internal resource for the REPL runtime, used to control the REPL's state during execution #[derive(Default, Clone)] -pub struct REPL { +pub struct ResREPL { /// Marks whether the REPL should exit after the current loop ends pub exit: bool, } |
