oauth2-rs icon indicating copy to clipboard operation
oauth2-rs copied to clipboard

Derive Default impl for EmptyExtraTokenFields

Open lukewestby opened this issue 3 years ago • 1 comments

Hello!

I'm wondering if you'd accept a contribution for a very minor quality-of-life change. I'm writing some unit tests that warrant building a BasicTokensResponse by hand and I just think it would be somewhat more convenient to write

BasicTokenResponse::new(
    AccessToken::new("at".to_string()),
    BasicTokenType::Bearer,
    Default::default(),
);

than to import EmptyExtraTokenFields and write

BasicTokenResponse::new(
    AccessToken::new("at".to_string()),
    BasicTokenType::Bearer,
    EmptyExtraTokenFields {},
);

Totally understand if you don't feel it's worth the trouble, but if you're open to it I'd love to send a PR to just include that additional derive.

lukewestby avatar Oct 08 '21 01:10 lukewestby

this seems reasonable, and I'd welcome a PR! I'll be on a trip for the next couple of weeks, but I'll take a look when I get back

ramosbugs avatar Oct 11 '21 03:10 ramosbugs