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

Make Atom Copy #155

Open
overlookmotel opened this issue Dec 17, 2024 · 0 comments
Open

Make Atom Copy #155

overlookmotel opened this issue Dec 17, 2024 · 0 comments

Comments

@overlookmotel
Copy link

Atom is just a wrapper around &str, so could be Copy.

I thought previously that we should avoid making Atom Copy in case we had a future reason for them not to be, like some form of reference-counting.

But now I can't see any such reason. Even if we store hash of string inside Atom (#46), that wouldn't prevent Atom being Copy.

This change would remove a ton of atom.clone() from all over the codebase.

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

No branches or pull requests

1 participant