ramosbugs / oauth2-rs

Extensible, strongly-typed Rust OAuth2 client library
Apache License 2.0
939 stars 163 forks source link

Derive clone for EndpointState types #263

Closed avtrujillo closed 8 months ago

avtrujillo commented 8 months ago

Currently, Client cannot properly derive clone, because none of the EndpointState types implement clone. For example, trying to use openidconnect's CoreClient in a context that requires it to be Clone produces the following error:

the trait bound openidconnect::EndpointSet: Clone is not satisfied required for Client<EmptyAdditionalClaims, ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...> to implement Clone

ramosbugs commented 8 months ago

Thanks for the PR! This is an another unfortunate example of https://github.com/rust-lang/rust/issues/26925.

The same issue applies to Client's derived Debug implementation. Would you mind adding Debug to those types as well?

avtrujillo commented 8 months ago

Would you mind adding Debug to those types as well?

Added. Thanks for the quick response!

ramosbugs commented 8 months ago

Thanks!