From 1b600158411eb3933dfd00a908063d53f7f6c0ee Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Tue, 2 Apr 2024 19:48:16 +0300 Subject: [PATCH] wip: make load_bunch compile --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 419f44b..025aeb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,7 +58,7 @@ use { use bevy::app::AppExit; #[throws] -fn load_bunch + NamedResource>( +fn load_bunch> + NamedResource>( paths: &[&str], ext: &str, map: &mut HashMap>, @@ -70,7 +70,9 @@ fn load_bunch + NamedResource>( if file_type.is_file() && fname.ends_with(ext) { for v in T::load_many(fname)? { map.entry(v.resource_name()) - .and_modify(|m: &mut V| error!("{} already exists", m.resource_name())) + .and_modify(|m: &mut Box| { + error!("{} already exists", m.resource_name()) + }) .or_insert(v); } }