diff --git a/Cargo.lock b/Cargo.lock index 1faa8b3121..f3a823ff5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,9 +214,9 @@ dependencies = [ [[package]] name = "assets_manager" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17769d44fe3eee8cdc255520183fee4e76b30f105de6431cd034e1d7a6f0499" +checksum = "1091e796450c5caa4bf1b05e4c17581291a281652e2faa870d2f1a64d51e7436" dependencies = [ "ahash 0.7.4", "bincode", diff --git a/common/assets/Cargo.toml b/common/assets/Cargo.toml index ae7fb642c8..e217e09456 100644 --- a/common/assets/Cargo.toml +++ b/common/assets/Cargo.toml @@ -7,7 +7,7 @@ version = "0.10.0" [dependencies] lazy_static = "1.4.0" -assets_manager = {version = "0.5.0", features = ["bincode", "ron", "json"]} +assets_manager = {version = "0.6.0", features = ["bincode", "ron", "json"]} ron = { version = "0.6", default-features = false } dot_vox = "4.0" image = { version = "0.23.12", default-features = false, features = ["png"] } diff --git a/common/assets/src/lib.rs b/common/assets/src/lib.rs index 9786ce8aa6..7468096306 100644 --- a/common/assets/src/lib.rs +++ b/common/assets/src/lib.rs @@ -101,10 +101,6 @@ pub trait AssetExt: Sized + Send + Sync + 'static { /// Loads directory and all files in it /// -/// NOTE: If you call `.iter()` on it, all failed files will be ignored -/// If you want to handle errors, call `.ids()` which will return -/// iterator over assets specifiers -/// /// # Errors /// An error is returned if the given id does not match a valid readable /// directory. diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index a432977fcd..2eec60db2e 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -625,7 +625,6 @@ impl Item { pub fn new_from_asset_glob(asset_glob: &str) -> Result, Error> { let specifier = asset_glob.strip_suffix(".*").unwrap_or(asset_glob); let defs = assets::load_dir::(specifier, true)?; - // use ids() instead of iter() because we don't want to ignore errors defs.ids().map(Item::new_from_asset).collect() } diff --git a/voxygen/i18n/src/lib.rs b/voxygen/i18n/src/lib.rs index c5e09530b4..27a2191073 100644 --- a/voxygen/i18n/src/lib.rs +++ b/voxygen/i18n/src/lib.rs @@ -118,8 +118,10 @@ impl common_assets::Compound for Language { .ids() { // Don't try to load manifests - if id.ends_with(&[".", LANG_MANIFEST_FILE].concat()) { - continue; + if let Some(id) = id.strip_suffix(LANG_MANIFEST_FILE) { + if id.ends_with('.') { + continue; + } } match cache.load(id) {