Closed Michael-F-Bryan closed 4 years ago
Thanks @ggriffiniii. Are you able to regenerate the files in google-apis-rs/generated with the new changes?
@Michael-F-Bryan, I will regenerate them.
PS this will change (I think in a breaking way) when we merge in the async branch because yup-oauth has breaking changes in 4.0...
@Michael-F-Bryan
I regenerated everything: https://github.com/google-apis-rs/generated/commit/d53ef689e20cc069164791ceb326aa17fec9d87b
This PR rearranges the where clause on
Client::new()
to make it work with type inference andimpl Trait
better.Clients currently explicitly require that an
auth
can be turned into aBox<dyn GetAccessToken>
, but this doesn't play well withimpl Trait
and theimpl GetAccessToken
returned bygoogle_api_auth::yup_oauth2::from_authenticator()
.For example, I am trying to use the following code:
(original code)
And
rustc
fails with the unhelpful error message "the trait boundimpl google_api_auth::GetAccessToken: std::convert::From<impl google_api_auth::GetAccessToken>
is not satisfied"... Which doesn't make sense consideringT: From<T>
.This is linked to #24 in that the user experience for authentication isn't great.