mirror of
https://codeberg.org/icewind/tf-asset-loader.git
synced 2026-06-03 16:44:10 +02:00
send+sync
This commit is contained in:
parent
01cd28ec09
commit
4476c0f986
3 changed files with 6 additions and 6 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -613,7 +613,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tf-asset-loader"
|
name = "tf-asset-loader"
|
||||||
version = "0.1.2"
|
version = "0.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"steamlocate",
|
"steamlocate",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tf-asset-loader"
|
name = "tf-asset-loader"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "Utility for loading assets from tf2 data files"
|
description = "Utility for loading assets from tf2 data files"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ pub enum LoaderError {
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Loader {
|
pub struct Loader {
|
||||||
sources: Vec<Arc<dyn AssetSource>>,
|
sources: Vec<Arc<dyn AssetSource + Send + Sync>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Debug for Loader {
|
impl Debug for Loader {
|
||||||
|
|
@ -58,11 +58,11 @@ impl Loader {
|
||||||
}
|
}
|
||||||
res.ok()
|
res.ok()
|
||||||
})
|
})
|
||||||
.map(|vpk| Arc::new(vpk) as Arc<dyn AssetSource>);
|
.map(|vpk| Arc::new(vpk) as Arc<dyn AssetSource + Send + Sync>);
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
let mut sources = vec![
|
let mut sources = vec![
|
||||||
Arc::new(tf_dir) as Arc<dyn AssetSource>,
|
Arc::new(tf_dir) as Arc<dyn AssetSource + Send + Sync>,
|
||||||
Arc::new(download),
|
Arc::new(download),
|
||||||
Arc::new(hl_dir),
|
Arc::new(hl_dir),
|
||||||
];
|
];
|
||||||
|
|
@ -73,7 +73,7 @@ impl Loader {
|
||||||
Ok(Loader { sources })
|
Ok(Loader { sources })
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_source<S: AssetSource + 'static>(&mut self, source: S) {
|
pub fn add_source<S: AssetSource + Send + Sync + 'static>(&mut self, source: S) {
|
||||||
self.sources.push(Arc::new(source))
|
self.sources.push(Arc::new(source))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue