aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/res
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-06 23:16:51 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-06 23:16:51 +0800
commit81635b93c597b10282cb14e0873f5e3d22395186 (patch)
tree200fd2632653fefe751ab5bfa6ebc7a8d4161638 /mingling/src/res
parenta16d1e6f204cc83104ad3dcc4f4266e304214044 (diff)
Rename `ExitCode` to `ResExitCode` and `REPL` to `ResREPL`
Diffstat (limited to 'mingling/src/res')
-rw-r--r--mingling/src/res/exit_code.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/mingling/src/res/exit_code.rs b/mingling/src/res/exit_code.rs
index e90d067..93ce98b 100644
--- a/mingling/src/res/exit_code.rs
+++ b/mingling/src/res/exit_code.rs
@@ -9,7 +9,7 @@ use mingling_core::{ProgramCollect, this};
/// The exit code is stored globally per `ProgramCollect` type and can be
/// retrieved via [`exit_code()`] or updated via [`update_exit_code()`].
#[derive(Debug, Default, Clone, Copy)]
-pub struct ExitCode {
+pub struct ResExitCode {
/// The numeric exit code value.
pub exit_code: i32,
}
@@ -19,7 +19,7 @@ pub fn update_exit_code<C>(exit_code: i32)
where
C: ProgramCollect<Enum = C> + 'static,
{
- this::<C>().modify_res(|e: &mut ExitCode| e.exit_code = exit_code);
+ this::<C>().modify_res(|e: &mut ResExitCode| e.exit_code = exit_code);
}
/// Retrieves the globally stored exit code for the given `ProgramCollect` type.
@@ -29,7 +29,7 @@ pub fn exit_code<C>() -> i32
where
C: ProgramCollect<Enum = C> + 'static,
{
- match this::<C>().res::<ExitCode>() {
+ match this::<C>().res::<ResExitCode>() {
Some(e) => e.exit_code,
None => 0,
}