Skip to content
This repository was archived by the owner on Jun 4, 2020. It is now read-only.
This repository was archived by the owner on Jun 4, 2020. It is now read-only.

Conflicting methods min and max on Set and Map #23

Closed
@KodrAus

Description

@KodrAus

In rust-lang/rust#42496, methods min and max were added to the Ord trait.

These methods are shadowing the inherent min and max on Set and Map (see: rust-lang/rust#43682), and unfortunately don't have the same signature, and there doesn't seem to be a single obvious fix for tree.

The easiest thing to do is rename Map.min/max and Set.min/max or just remove those methods. It might also be possible to design around the issue by exposing the min and max functions on a type that doesn't implement Ord. Maybe something like Map.find().min() and Map.find_mut().min()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions