Skip to content

drop the PartialEq impl #178

Closed
Closed
@BurntSushi

Description

@BurntSushi

I'm now of the opinion that merging #81 was a mistake. I think having a PartialEq impl on Regex is incredibly misleading, even though it is clearly documented. In particular, regular expressions do actually have a formal notion of equality, and it is quite expensive to compute. We simply shouldn't expose any PartialEq or Eq impls.

If users need a PartialEq impl (e.g., to store regexes as keys in a HashMap?), then I think requiring a newtype is fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions