#Oauth2 example error

6 messages · Page 1 of 1 (latest)

haughty scroll
#

Hello, is anyone familiar with oauth2 crate? I am trying to run examples that are provided in the docs and getting this error. There is also an issue on github open about it: https://github.com/ramosbugs/oauth2-rs/issues/311
What I am trying to run: https://github.com/ramosbugs/oauth2-rs/blob/main/examples/google.rs
Error: expected a `Fn(oauth2::http::Request<Vec<u8>>)` closure, found `oauth2::reqwest::blocking::Client` the trait `Fn(oauth2::http::Request<Vec<u8>>)` is not implemented for `oauth2::reqwest::blocking::Client` required for `oauth2::reqwest::blocking::Client` to implement `SyncHttpClient

peak hinge
#

$ cargo run --example google

#

then with $ cargo run --example google --features="reqwest-blocking" it builds

#

if you aren't getting that message probably run rustup update to get a more recent rust installation

haughty scroll
#

yup got it, it seems to work now, I did not had --features="reqwest-blocking" in my .toml