mirror of
https://codeberg.org/icewind/tf-asset-loader.git
synced 2026-06-03 08:34:21 +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]]
|
||||
name = "tf-asset-loader"
|
||||
version = "0.1.2"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"steamlocate",
|
||||
"thiserror",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tf-asset-loader"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "Utility for loading assets from tf2 data files"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ pub enum LoaderError {
|
|||
|
||||
#[derive(Clone)]
|
||||
pub struct Loader {
|
||||
sources: Vec<Arc<dyn AssetSource>>,
|
||||
sources: Vec<Arc<dyn AssetSource + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl Debug for Loader {
|
||||
|
|
@ -58,11 +58,11 @@ impl Loader {
|
|||
}
|
||||
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)]
|
||||
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(hl_dir),
|
||||
];
|
||||
|
|
@ -73,7 +73,7 @@ impl Loader {
|
|||
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))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue