Skip to content

Make Atom Copy #8606

@overlookmotel

Description

@overlookmotel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions