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

Avoid Error::new in from_scientific except in error cases #350

Merged
merged 1 commit into from
Apr 23, 2021

Conversation

thomcc
Copy link
Contributor

@thomcc thomcc commented Apr 23, 2021

Error::new allocates a String (via str's Into impl), so there's no reason to pay this cost in the success case.

@paupino
Copy link
Owner

paupino commented Apr 23, 2021

Awesome, thanks for fixing this @thomcc

@paupino paupino merged commit 9c2a116 into paupino:master Apr 23, 2021
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