summaryrefslogtreecommitdiff
path: root/engine/src/material.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/material.rs')
-rw-r--r--engine/src/material.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/src/material.rs b/engine/src/material.rs
index ae0751b..ded30a2 100644
--- a/engine/src/material.rs
+++ b/engine/src/material.rs
@@ -57,14 +57,14 @@ impl Default for Material
impl Asset for Material
{
- fn dependencies(&self) -> impl Iterator<Item = AssetDependency<'_>>
+ fn visit_dependencies<'this>(
+ &'this self,
+ func: &mut dyn FnMut(AssetDependency<'this>),
+ )
{
- self.loading_textures.iter().map(|(_, texture_label)| {
- AssetDependency::new::<Texture>(AssetLabel {
- path: (&*texture_label.path).into(),
- name: texture_label.name.as_deref().map(Into::into),
- })
- })
+ for (_, texture_label) in &self.loading_textures {
+ func(AssetDependency::new::<Texture>(texture_label.borrow()));
+ }
}
}