Closed bnjbvr closed 4 months ago
Hey @bnjbvr, I'm confused why the Send
bound is needed either on the trait's associated type or on the methods in openidconnect
.
Note that even if the bounds are needed in openidconnect
, Rust 1.79 stabilized bounds on associated types, which should avoid the need to add the bound here (at the cost of incrementing the MSRV in the other crate).
I believe 6e583bd03203e42ef712fc90edb57cf5a389f9b7 should have fixed the issues around Send
bounds. When using a Send
HTTP client, the compiler should automatically infer Send
for the returned future. See related discussions in #260, #255, and ramosbugs/openidconnect-rs#171.
If possible, I'd like to continue supporting both Send
and non-Send
HTTP clients.
Ah indeed, thanks for the push back, I hadn't retried with the latest commit of the crate, and turns out the Send
bound isn't required anymore. Closing this.
This is useful for adding some
Send
bounds on other methods in the dependentopenidconnect-rs
crate (here). Since there was acfg
guard for wasm in the reqwest_client implementation, I also included it here, so that wasm doesn't require the bound itself.