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 an in-place rotate method for slices to libcore #41670

Merged
merged 6 commits into from
Jun 2, 2017

Commits on May 21, 2017

  1. Add an in-place rotate method for slices to libcore

    A helpful primitive for moving chunks of data around inside a slice.
    In particular, adding elements to the end of a Vec then moving them
    somewhere else, as a way to do efficient multiple-insert.  (There's
    drain for efficient block-remove, but no easy way to block-insert.)
    
    Talk with another example: <https://youtu.be/qH6sSOr-yk8?t=560>
    scottmcm committed May 21, 2017
    Configuration menu
    Copy the full SHA
    c05676b View commit details
    Browse the repository at this point in the history
  2. Change the doctest example to slide

    Batch-insert is better done with Vec::splice
    scottmcm committed May 21, 2017
    Configuration menu
    Copy the full SHA
    ebc8489 View commit details
    Browse the repository at this point in the history
  3. Remove the optimization in ptr_swap_n

    It can be revisted later after the mem::swap optimizations land.
    scottmcm committed May 21, 2017
    Configuration menu
    Copy the full SHA
    59a6fe6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a92ad5e View commit details
    Browse the repository at this point in the history
  5. Tweak comment wording

    scottmcm committed May 21, 2017
    Configuration menu
    Copy the full SHA
    95db271 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    094d61f View commit details
    Browse the repository at this point in the history