Make rc2 factory API Send-able

This commit is contained in:
NGnius (Graham) 2022-10-21 21:20:06 -04:00
parent 7d60b6fa15
commit 5f6dedebac
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "libfj"
version = "0.7.0"
version = "0.7.1"
authors = ["NGnius (Graham) <ngniusness@gmail.com>"]
edition = "2018"
description = "An unofficial collection of APIs used in FreeJam games and mods"
@ -18,7 +18,7 @@ exclude = [
[dependencies]
serde = { version = "^1", features = ["derive"]}
serde_json = "^1"
reqwest = { version = "^0.11", features = ["json"], optional = true}
reqwest = { version = "^0.11", features = ["json", "rustls-tls"], optional = true, default-features=false}
url = "^2.2"
ureq = { version = "^2", features = ["json"], optional = true}
async-trait = { version = "0.1", optional = true }

View file

@ -47,7 +47,7 @@ async fn handle_json_response<D: for<'a> serde::Deserialize<'a>>(response: Respo
/// CRF API implementation
pub struct FactoryAPI {
client: Client,
token: Mutex<Box<dyn ITokenProvider>>,
token: Mutex<Box<dyn ITokenProvider + Send>>,
}
impl FactoryAPI {
@ -60,7 +60,7 @@ impl FactoryAPI {
}*/
/// Create a new instance using the provided token provider.
pub fn with_auth(token_provider: Box<dyn ITokenProvider>) -> FactoryAPI {
pub fn with_auth(token_provider: Box<dyn ITokenProvider + Send>) -> FactoryAPI {
FactoryAPI {
client: Client::new(),
token: Mutex::new(token_provider),