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/single_instance.rs | |
| parent | 3aa409a55e4f2f0ab41b0949cc06eb13c2da4a43 (diff) | |
Enhance code quality across the entire codebase
Diffstat (limited to 'mingling_core/src/program/single_instance.rs')
| -rw-r--r-- | mingling_core/src/program/single_instance.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mingling_core/src/program/single_instance.rs b/mingling_core/src/program/single_instance.rs index 45d4d33..70771d5 100644 --- a/mingling_core/src/program/single_instance.rs +++ b/mingling_core/src/program/single_instance.rs @@ -7,6 +7,11 @@ pub(crate) static THIS_PROGRAM: OnceLock<Option<Box<dyn std::any::Any + Send + S OnceLock::new(); /// Returns a reference to the current program instance, panics if not set. +/// +/// # Panics +/// +/// Panics if the program has not been initialized yet. +#[must_use] pub fn this<C>() -> &'static Program<C> where C: ProgramCollect<Enum = C> + 'static, |
