Simplify asset code a bit

This commit is contained in:
Jonathan Kelley committed 2024-01-04 18:01:13 -08:00
1 parent fef7b83b79
commit 7444796a85
8 files changed
+84 -96

No files matched your search

+4 -2
View File
@@ -75,8 +75,10 @@ impl<F: AssetFuture, T: Fn(&AssetRequest) -> F + Send + Sync + 'static> AssetHan
}
}
type AssetHandlerRegistryInner =
Slab<Box<dyn Fn(&AssetRequest) -> Pin<Box<dyn AssetFuture>> + Send + Sync + 'static>>;
type UserAssetHandler =
Box<dyn Fn(&AssetRequest) -> Pin<Box<dyn AssetFuture>> + Send + Sync + 'static>;
type AssetHandlerRegistryInner = Slab<UserAssetHandler>;
#[derive(Clone)]
pub struct AssetHandlerRegistry(Arc<RwLock<AssetHandlerRegistryInner>>);