Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking change: use a helper type to accept static strs as well as heap-allocated Strings in builders and API #171

Closed
wants to merge 3 commits into from

Conversation

WilliamVenner
Copy link

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.

@ramosbugs
Copy link
Owner

See discussion in #248

@ramosbugs ramosbugs closed this Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants