Make ResourceStorage trait &self-based and remove 'static requirement (#4188)

* Make ResourceStorage trait &self-based with elided-lifetime ResourceFuture

* Adress review comments
This commit is contained in:
Dennis Kobert
2026-06-01 12:37:05 +02:00
committed by GitHub
parent e32ff4b7f0
commit 7b9c480a8d
12 changed files with 52 additions and 48 deletions

View File

@@ -47,7 +47,7 @@ pub trait ApplicationIo {
fn gpu_executor(&self) -> Option<&Self::Executor> {
None
}
fn load_resource(&self, hash: resource::ResourceHash) -> resource::ResourceFuture;
fn load_resource(&self, hash: resource::ResourceHash) -> resource::ResourceFuture<'_>;
}
impl<T: ApplicationIo> ApplicationIo for &T {
@@ -57,7 +57,7 @@ impl<T: ApplicationIo> ApplicationIo for &T {
(**self).gpu_executor()
}
fn load_resource(&self, hash: resource::ResourceHash) -> resource::ResourceFuture {
fn load_resource(&self, hash: resource::ResourceHash) -> resource::ResourceFuture<'_> {
(**self).load_resource(hash)
}
}