Closed
Description
Iterator::max
states "If the iterator is empty, None
is returned.". In the case of an unbounded range, we know that this maximum does not exist. This means RangeFrom::max
is consigned to looping forever.
If the documentation for Iterator::max
were rewritten: "If the iterator is empty, or if the maximum element is unbounded, None
is returned.", this could then be implemented as special cases for unbounded iterators (e.g. RangeFrom
), which is far more useful and intuitive.
The same complaint goes for Iterator::last
.
Metadata
Metadata
Assignees
Labels
No labels