diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2026-06-09 16:11:45 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2026-06-09 16:11:45 +0800 |
| commit | 87d5d6a3b83b3214477874c1734fca42a6c80288 (patch) | |
| tree | e6a84069c6d2e92ee66e8fa0564b925a550f8c34 /mingling_core/src/asset | |
| parent | ab796e81ab4e3e9fa1a26f8217635eebec658b5e (diff) | |
Remove misleading SAFETY comment in LazyRes force_init
Diffstat (limited to 'mingling_core/src/asset')
| -rw-r--r-- | mingling_core/src/asset/lazy_resource.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mingling_core/src/asset/lazy_resource.rs b/mingling_core/src/asset/lazy_resource.rs index 8cf8d89..6f1bd81 100644 --- a/mingling_core/src/asset/lazy_resource.rs +++ b/mingling_core/src/asset/lazy_resource.rs @@ -88,8 +88,8 @@ impl<T: Send + Sync + 'static> LazyRes<T> { fn force_init(&mut self) -> &mut LazyInner<T> { if matches!(&self.inner, LazyInner::Uninit(_, _)) { - // Replace with a temporary poison value so we can move the real factory out. - // SAFETY: if the factory panics, the poison value's `unreachable!()` will + // Replace with a temporary poison value so the real factory can be moved out. + // If the factory panics, the poison value's `unreachable!()` will // catch any subsequent access. let poisoned = LazyInner::Uninit( Box::new(|| unreachable!("LazyRes poisoned during initialization")), |
