Skip to content
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

Implement useful steps_between for all integers #59444

Merged
merged 3 commits into from
Apr 2, 2019

Commits on Mar 26, 2019

  1. Implement useful steps_between for all integers

    We can use `usize::try_from` to convert steps from any size of integer.
    This enables a meaningful `size_hint()` for larger ranges, rather than
    always just `(0, None)`. Now they return the true `(len, Some(len))`
    when it fits, otherwise `(usize::MAX, None)` for overflow.
    cuviper committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    01162d8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3d389f2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a548d83 View commit details
    Browse the repository at this point in the history