diff options
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/src/asset.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/src/asset.rs b/engine/src/asset.rs index b72fc74..eefda8d 100644 --- a/engine/src/asset.rs +++ b/engine/src/asset.rs @@ -18,11 +18,10 @@ use std::sync::Arc; use ecs::actions::Actions; -use crate::ecs::pair; use crate::ecs::pair::ChildOf; use crate::ecs::phase::{Phase, PRE_UPDATE as PRE_UPDATE_PHASE}; use crate::ecs::sole::Single; -use crate::ecs::{declare_entity, Sole}; +use crate::ecs::{declare_entity, pair, Sole}; use crate::work_queue::{Work, WorkQueue}; declare_entity! { @@ -161,7 +160,7 @@ impl Assets func: impl Fn(&mut Submitter<'_>, &Path, Option<&AssetSettings>) -> Result<(), Err>, ) where AssetSettings: 'static, - Err: std::error::Error + 'static, + Err: std::error::Error + Send + Sync + 'static, { self.importers.push(WrappedImporterFn::new(func)); @@ -522,8 +521,9 @@ impl Assets asset_settings.as_deref(), ) { tracing::error!( - "Failed to load asset {}: {err}", - asset_path.display() + "Failed to import asset {}: {:#}", + asset_path.display(), + crate::Error::new(err) ); } }, @@ -750,7 +750,7 @@ enum ImporterError IncorrectAssetSettingsType(PathBuf), #[error(transparent)] - Other(Box<dyn std::error::Error>), + Other(Box<dyn std::error::Error + Send + Sync>), } #[derive(Debug, Clone)] @@ -770,7 +770,7 @@ impl WrappedImporterFn InnerFunc: Fn(&mut Submitter<'_>, &Path, Option<&AssetSettings>) -> Result<(), Err>, AssetSettings: 'static, - Err: std::error::Error + 'static, + Err: std::error::Error + Send + Sync + 'static, { assert_eq!(size_of::<InnerFunc>(), 0); |
