typst / ecow

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

Restructure public api #20

Closed CosmicHorrorDev closed 1 year ago

CosmicHorrorDev commented 1 year ago

Resolves #18

This follows the described restructuring, renaming, and switches the unit tests to integration tests. The only change that the latter involved was switching a single call from .extend_from_byte_slice() to .extend_from_slice() since .extend_from_byte_slice() isn't included in the public API (and should get tested well by the EcoString tests anyways)

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -3.69 :warning:

Comparison is base (ebcbaa1) 86.68% compared to head (7eaa477) 82.99%.

:exclamation: Current head 7eaa477 differs from pull request most recent head c24c145. Consider uploading reports for the commit c24c145 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #20 +/- ## ========================================== - Coverage 86.68% 82.99% -3.69% ========================================== Files 5 4 -1 Lines 1359 1041 -318 ========================================== - Hits 1178 864 -314 + Misses 181 177 -4 ``` | [Impacted Files](https://codecov.io/gh/typst/ecow/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst) | Coverage Δ | | |---|---|---| | [src/lib.rs](https://codecov.io/gh/typst/ecow/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst#diff-c3JjL2xpYi5ycw==) | `100.00% <ø> (ø)` | | | [src/string.rs](https://codecov.io/gh/typst/ecow/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst#diff-c3JjL3N0cmluZy5ycw==) | `52.40% <ø> (ø)` | | | [src/vec.rs](https://codecov.io/gh/typst/ecow/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst#diff-c3JjL3ZlYy5ycw==) | `89.23% <ø> (ø)` | | | [tests/tests.rs](https://codecov.io/gh/typst/ecow/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst#diff-dGVzdHMvdGVzdHMucnM=) | | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

CosmicHorrorDev commented 1 year ago

Looks like the reduced coverage is just from src/tests.rs no longer being covered which is to be expected :grin:

laurmaedje commented 1 year ago

Thanks!

laurmaedje commented 1 year ago

Coverage reduction shouldn't fail CI in my opinion. Besides, do you have plans for further testing soon? I'd like to publish to crates.io soon, but would be a shame if you found UB immediately after.

CosmicHorrorDev commented 1 year ago

I agree. I just publish to codecov without the integration which is what's failing CI. Could be worth switching over to that

I've got more testing I would like to do, but it's going to be a slow trickle since I'm very pressed on time lately. I think it's fine to go ahead and push a release and then just yank with new releases if UB is found

I haven't found anything since the incorrect Send and Sync bounds, so it should be reasonably robust at this point