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

Support creating static ArcStr's at runtime (leaking them) #55

Merged
merged 12 commits into from
May 6, 2024
Merged

Conversation

thomcc
Copy link
Owner

@thomcc thomcc commented May 5, 2024

I wrote this a while ago, then didn't need it, but it may be useful to others.

The main drawback is that it adds a branch to refcount manipulation, but that should be a wash (the function is already doing atomic RMWs, which are likely more costly than a the branching most of the time).

On the positive side, it makes it so we no longer need to abort on refcount overflow -- we can simply transition the string to static (leak it).

I've also updated some deps and may do a bit of other cleanup while I'm here.

EDIT: this is now mostly cleanup.

@codecov-commenter
Copy link

codecov-commenter commented May 5, 2024

Codecov Report

Attention: Patch coverage is 52.94118% with 48 lines in your changes are missing coverage. Please review.

Project coverage is 83.22%. Comparing base (36dcce9) to head (b05a84b).
Report is 1 commits behind head on main.

Files Patch % Lines
src/arc_str.rs 52.94% 48 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
- Coverage   92.48%   83.22%   -9.27%     
==========================================
  Files           4        4              
  Lines         386      447      +61     
==========================================
+ Hits          357      372      +15     
- Misses         29       75      +46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thomcc thomcc merged commit 9abe831 into main May 6, 2024
23 checks passed
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