typst / ecow

Compact, clone-on-write vector and string.
Apache License 2.0
208 stars 16 forks source link

Add `From<&String> for EcoString` impl #36

Closed IanManske closed 1 year ago

IanManske commented 1 year ago

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 commented 1 year ago

Codecov Report

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

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

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

:loudspeaker: Thoughts on this report? Let us know!.

laurmaedje commented 1 year ago

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