mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Update assets_manager
to 0.6.0
This commit is contained in:
parent
f7161c1859
commit
ef1c51332d
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -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",
|
||||
|
@ -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"] }
|
||||
|
@ -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.
|
||||
|
@ -625,7 +625,6 @@ impl Item {
|
||||
pub fn new_from_asset_glob(asset_glob: &str) -> Result<Vec<Self>, Error> {
|
||||
let specifier = asset_glob.strip_suffix(".*").unwrap_or(asset_glob);
|
||||
let defs = assets::load_dir::<RawItemDef>(specifier, true)?;
|
||||
// use ids() instead of iter() because we don't want to ignore errors
|
||||
defs.ids().map(Item::new_from_asset).collect()
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user