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
Description
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
Labels
No labels