]> git.lizzy.rs Git - rust.git/commit
define copy_within on slices
authorJack O'Connor <oconnor663@gmail.com>
Thu, 23 Aug 2018 22:22:53 +0000 (18:22 -0400)
committerJack O'Connor <oconnor663@gmail.com>
Thu, 20 Sep 2018 04:57:05 +0000 (00:57 -0400)
commitb3ffd3344e3ac5e2468c7255c2bbecac13daab82
tree505ea34e24c9657055bce47c950ea7f05c5ac85a
parent1d33aedaa928cc92d58c0bfe7ff433714ff52976
define copy_within on slices

This is a safe wrapper around ptr::copy, for regions within a single
slice. Previously, safe in-place copying was only available as a side
effect of Vec::drain.
src/libcore/slice/mod.rs