Skip to content

Pick over the standard libraries for types that don't (but can) implement common traits #15294

Closed
@huonw

Description

@huonw

... and implement/derive them.

Traits like Eq, Hash, Ord, Clone are sometimes forgotten (or have been missed, in the various library changes that have happened), and this is annoying for downstream users. To paper over the deeper issue (how to make adding these impls more natural/harder to forget), impls for all the various traits can be added to types.

List of types missing things just from a basic scan:

  • many types in collections (only implement the Partial comparison traits, and pretty much none of them implement Hash)
  • semver::Version
  • all types in num are missing Hash
  • url::Path, url::UserInfo
  • uuid::UuidVariant, uuid::UuidVersion

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions