aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/src/program/repl_exec.rs
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-06-09 06:20:21 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2026-06-09 06:21:29 +0800
commit78f282007980fe9c9ef143a6bc6fb76282957ab6 (patch)
treec13a9a7a79796e5e0bd0805a16a4a7fab97cd063 /mingling_core/src/program/repl_exec.rs
parentafe4245084563fa0efe85ae6de74b3652829a08a (diff)
Replace `OnceLock<Option<Box<dyn Any>>>` with custom `ProgramCell` type
Reduces indirection and allows taking ownership of the program instance for proper cleanup before `process::exit()`
Diffstat (limited to 'mingling_core/src/program/repl_exec.rs')
-rw-r--r--mingling_core/src/program/repl_exec.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/mingling_core/src/program/repl_exec.rs b/mingling_core/src/program/repl_exec.rs
index d6b3f00..d292be1 100644
--- a/mingling_core/src/program/repl_exec.rs
+++ b/mingling_core/src/program/repl_exec.rs
@@ -129,9 +129,7 @@ where
payload: panic_info,
};
let program = crate::program::THIS_PROGRAM
- .get()
- .unwrap()
- .as_ref()
+ .get_raw()
.unwrap()
.downcast_ref::<Program<C>>()
.unwrap();