Simplify asset code a bit
This commit is contained in:
8 files changed
+84
-96
No files matched your search
@@ -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>>);
|
||||
|
||||
Reference in new issue
Block a user