-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signed indexed_iter? #60
Comments
Hm... I am not so sure about adding another |
For Not particularly happy with |
I often use signed values for computing locations on the grid, and one annoyance is that
indexed_iter()
forcesusize
. It would be nice to have some way to control the type of the values is produces. I think it would be invasive to add<T>
toindexed_iter()
, though, as Rust would start asking users to add the template param if you have a situation where the result could not be inferred. This is what I tried:Note that the bounds checking only happens once, rather than every time, as it would for a user converting to the type later. But call sites can't always infer I, requiring a type here sometimes where it wasn't required before. Would this make sense as
indexed_iter_t
, perhaps?The text was updated successfully, but these errors were encountered: