diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-10 16:16:31 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-10 16:16:31 +0800 |
| commit | 61b770ca958afa7e5eca4c50f5e06bdf3ed7a94a (patch) | |
| tree | ddc08d59e2c4e3f3ecfc431204635e0965ba544b | |
| parent | deece0c28aa02b9a09d6e0a9912227330aa16a6f (diff) | |
refactor(asset): replace wildcard match with explicit variants
| -rw-r--r-- | mingling_core/src/asset/lazy_resource.rs | 6 | ||||
| -rw-r--r-- | mingling_core/src/comp.rs | 2 |
2 files changed, 4 insertions, 4 deletions
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<T: Send + Sync + 'static> LazyRes<T> { self.force_init(); match &self.inner { LazyInner::Init(t, _) => t, - _ => unreachable!(), + LazyInner::Uninit(..) => unreachable!(), } } @@ -120,7 +120,7 @@ impl<T: Send + Sync + 'static> LazyRes<T> { self.force_init(); match &mut self.inner { LazyInner::Init(t, _) => t, - _ => unreachable!(), + LazyInner::Uninit(..) => unreachable!(), } } @@ -178,7 +178,7 @@ impl<T: Send + Sync + 'static> LazyRes<T> { 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::<P>(ctx); match fallback { Suggest::FileCompletion => default, - _ => fallback.combine(default), + Suggest::Suggest(_) => fallback.combine(default), } } }, |
