Long lines

This commit is contained in:
Tim Chevalier 2013-01-13 16:34:54 -08:00
parent 07c39b1436
commit 62d1db1d6c
2 changed files with 8 additions and 4 deletions

View File

@ -134,7 +134,8 @@ pub unsafe fn copy_memory<T>(dst: *mut T, src: *const T, count: uint) {
* and destination may overlap.
*/
#[inline(always)]
pub unsafe fn copy_overlapping_memory<T>(dst: *mut T, src: *const T, count: uint) {
pub unsafe fn copy_overlapping_memory<T>(dst: *mut T, src: *const T,
count: uint) {
let n = count * sys::size_of::<T>();
libc_::memmove(dst as *mut c_void, src as *c_void, n as size_t);
}

View File

@ -2085,7 +2085,8 @@ pub mod raw {
* Copies `count` bytes from `src` to `dst`. The source and destination
* may overlap.
*/
pub unsafe fn copy_memory<T>(dst: &[mut T], src: &[const T], count: uint) {
pub unsafe fn copy_memory<T>(dst: &[mut T], src: &[const T],
count: uint) {
assert dst.len() >= count;
assert src.len() >= count;
@ -2102,7 +2103,8 @@ pub mod raw {
* Copies `count` bytes from `src` to `dst`. The source and destination
* may overlap.
*/
pub unsafe fn copy_overlapping_memory<T>(dst: &[mut T], src: &[const T], count: uint) {
pub unsafe fn copy_overlapping_memory<T>(dst: &[mut T], src: &[const T],
count: uint) {
assert dst.len() >= count;
assert src.len() >= count;
@ -2178,7 +2180,8 @@ pub mod bytes {
* Copies `count` bytes from `src` to `dst`. The source and destination
* may overlap.
*/
pub fn copy_overlapping_memory(dst: &[mut u8], src: &[const u8], count: uint) {
pub fn copy_overlapping_memory(dst: &[mut u8], src: &[const u8],
count: uint) {
// Bound checks are done at vec::raw::copy_overlapping_memory.
unsafe { vec::raw::copy_overlapping_memory(dst, src, count) }
}