Closed
Description
In order to implement size_hint()
on Range
, we need some numeric trait that covers the ability to convert a given type to uint
(or more generally, Option<uint>
, to cover out of bounds conversions).
More specifically, we need to convert the result of a - b
where a
and b
are values of the numeric type. The definition for this conversion to uint
would be the number of times that you'd have to add One::one()
to the result to get a
back (which is the obvious definition, really).
This is needed because range()
doesn't restrict its inputs to primitive numeric types.
Metadata
Metadata
Assignees
Labels
No labels