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

Add .wrapping_offset() methods #37422

Merged
merged 2 commits into from
Nov 5, 2016
Merged

Add .wrapping_offset() methods #37422

merged 2 commits into from
Nov 5, 2016

Commits on Oct 26, 2016

  1. core::ptr: Add .wrapping_offset() methods

    .wrapping_offset() exposes the arith_offset intrinsic in the core
    module. This is the first step in making it possible to stabilize the
    interface later.
    
    `arith_offset` is a useful tool for developing iterators for two
    reasons:
    
    1. `arith_offset` is used by the slice's iterator, the most important
       iterator in libcore, and it is natural that Rust users need the same
       power available to implement similar iterators.
    2. It is a good way to implement raw pointer iterations with step
       greater than one.
    
    The name seems to fit the style of methods like "wrapping_add".
    bluss committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    8b2108c View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2016

  1. Configuration menu
    Copy the full SHA
    67626e0 View commit details
    Browse the repository at this point in the history