Open
Description
To reproduce:
[dependencies]
openidconnect = "4.0.0"
reqwest = { version = "0.12.12", default-features = false, features = ["http3"] }
error: future cannot be shared between threads safely
--> /home/tux/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/oauth2-5.0.0/src/reqwest_client.rs:16:9
|
16 | / Box::pin(async move {
17 | | let response = self
18 | | .execute(request.try_into().map_err(Box::new)?)
19 | | .await
... |
35 | | .map_err(HttpClientError::Http)
36 | | })
| |__________^ future created by async block is not `Sync`
|
= note: consider using `--verbose` to print the full type name to the console
= help: the trait `Sync` is not implemented for `dyn Future<Output = Result<Response<...>, ...>> + Send`
note: future is not `Sync` as it awaits another future which is not `Sync`
--> /home/tux/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/oauth2-5.0.0/src/reqwest_client.rs:17:28
|
17 | let response = self
| ____________________________^
18 | | .execute(request.try_into().map_err(Box::new)?)
| |_______________________________________________________________^ await occurs here on type `impl Future<Output = std::result::Result<reqwest::Response, reqwest::Error>>`, which is not `Sync`
= note: required for the cast from `Pin<Box<...>>` to `Pin<Box<dyn Future<Output = Result<..., ...>> + Send + Sync>>`
error: could not compile `oauth2` (lib) due to 1 previous error
Metadata
Metadata
Assignees
Labels
No labels