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

Refactor unsafe implementation of std::mem::replace #117189

Closed
wants to merge 2 commits into from

Commits on Oct 25, 2023

  1. Refactor unsafe implementation of std::mem::replace

    The function now defers to mem::swap, which both
    eliminates the use of `unsafe` in the function, and
    also allows it (and mem::take) to benefit from
    any performance enhancements to mem::swap, such as
    the current use of ptr::swap_nonoverlapping for large
    types.
    chfogelman committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    1a81b92 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e1fe09c View commit details
    Browse the repository at this point in the history