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

breaking change: use a helper type to accept static `str`s as well as heap-allocated `String`s in builders and API

Open WilliamVenner opened this issue 3 years ago • 0 comments

I have refactored parts of the API to accept str as well as String to reduce unnecessary allocations.

I decided to not use Cow<'static, str> and instead made the AsStr type in order to implement the as_str function for backwards compatibility. Despite backwards-compatibility-aware changes, this may introduce breaking changes for some users, so a major version change would be required for this PR.

WilliamVenner avatar Feb 18 '22 18:02 WilliamVenner