From 61b770ca958afa7e5eca4c50f5e06bdf3ed7a94a Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 10 Aug 2026 16:16:31 +0800 Subject: refactor(asset): replace wildcard match with explicit variants --- mingling_core/src/asset/lazy_resource.rs | 6 +++--- mingling_core/src/comp.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mingling_core') diff --git a/mingling_core/src/asset/lazy_resource.rs b/mingling_core/src/asset/lazy_resource.rs index f2a5e3d..e8ec55b 100644 --- a/mingling_core/src/asset/lazy_resource.rs +++ b/mingling_core/src/asset/lazy_resource.rs @@ -110,7 +110,7 @@ impl LazyRes { self.force_init(); match &self.inner { LazyInner::Init(t, _) => t, - _ => unreachable!(), + LazyInner::Uninit(..) => unreachable!(), } } @@ -120,7 +120,7 @@ impl LazyRes { self.force_init(); match &mut self.inner { LazyInner::Init(t, _) => t, - _ => unreachable!(), + LazyInner::Uninit(..) => unreachable!(), } } @@ -178,7 +178,7 @@ impl LazyRes { LazyInner::Uninit(Box::new(|| unreachable!()), None), ) { LazyInner::Init(t, _) => t, - _ => unreachable!(), + LazyInner::Uninit(..) => unreachable!(), } } } diff --git a/mingling_core/src/comp.rs b/mingling_core/src/comp.rs index 7312a06..f2e50c8 100644 --- a/mingling_core/src/comp.rs +++ b/mingling_core/src/comp.rs @@ -183,7 +183,7 @@ impl CompletionHelper { let default = default_completion::

(ctx); match fallback { Suggest::FileCompletion => default, - _ => fallback.combine(default), + Suggest::Suggest(_) => fallback.combine(default), } } }, -- cgit