num-iter
num-iter copied to clipboard
`ToPrimitive` bound on `Iterator` impl for `Range` and related traits.
See this line which references rust-lang/rust#10414, now closed. The modern Range trait in the stdlib uses an unstable Step trait to generate its size_hint; perhaps something similar would work for this crate?
Well, core can get away with that because they only support iterating Range with the primitive integer types, which can privately implement Step. For num-iter, we would need a public (stable) trait that external users can implement to make this Range work for their types.
Yes, agreed, it would need to be stable. But that seems more flexible than requiring ToPrimitive.