| Crates.io | copy_in_place |
| lib.rs | copy_in_place |
| version | 0.2.2 |
| created_at | 2018-08-26 05:43:27.669635+00 |
| updated_at | 2022-11-29 01:27:25.907633+00 |
| description | [deprecated] a safe wrapper around ptr::copy for efficient copying within slices |
| homepage | |
| repository | https://github.com/oconnor663/copy_in_place |
| max_upload_size | |
| id | 81465 |
| size | 6,766 |
This crate provides a single function, a safe wrapper around ptr::copy
for efficient copying within slices.
DEPRECATED: As of Rust 1.37, the standard library provides the equivalent
copy_within
method on slices. This crate is deprecated, and it won't receive any further updates or fixes.
Copying four bytes within a slice:
let mut bytes = *b"Hello, World!";
copy_in_place(&mut bytes, 1..5, 8);
assert_eq!(&bytes, b"Hello, Wello!");