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

feat: make parse() accept &str #63

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

xJonathanLEI
Copy link
Contributor

There's no reason the parse() function would take a owned String while all it really needs is a referenced str. This function is re-exported so it makes sense to make it as generic as possible. The current implementation forces downstream applications to unnecessarily clone source strings.

This PR fixes it by making the parameter generic without breaking public API. String is still accepted.

Copy link
Contributor

@Okm165 Okm165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Okm165 Okm165 merged commit a9f8048 into iosis-tech:main Jan 4, 2025
18 checks passed
@xJonathanLEI xJonathanLEI deleted the dev/parse_str branch January 5, 2025 03:46
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.

2 participants