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

Add From<&String> for EcoString impl #36

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Add From<&String> for EcoString impl #36

merged 1 commit into from
Nov 6, 2023

Conversation

IanManske
Copy link
Contributor

@IanManske IanManske commented Nov 6, 2023

Allows converting from &String into EcoString for convenience. Otherwise, one has to do string.as_str().into().
Since converting String to EcoString already allocates/copies, then adding this impl for &String shouldn't be any different.

@codecov-commenter
Copy link

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
src/string.rs 74.10% <0.00%> (-1.01%) ⬇️

📢 Thoughts on this report? Let us know!.

@laurmaedje laurmaedje merged commit ed469f8 into typst:main Nov 6, 2023
4 checks passed
@laurmaedje
Copy link
Member

Thanks, looks like an oversight since all the other impls are in place (also the reverse).

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.

3 participants