removing checks from vec::bytes::memcpy and memmove as are duplicated from raw::

This commit is contained in:
asdf 2013-01-08 02:07:50 -05:00 committed by Graydon Hoare
parent 4096c9f25f
commit dd73dd0e37

View File

@ -2041,9 +2041,7 @@ pub mod bytes {
* may not overlap.
*/
pub fn memcpy(dst: &[mut u8], src: &[const u8], count: uint) {
assert dst.len() >= count;
assert src.len() >= count;
// Bound checks are done at vec::raw::memcpy.
unsafe { vec::raw::memcpy(dst, src, count) }
}
@ -2054,9 +2052,7 @@ pub mod bytes {
* may overlap.
*/
pub fn memmove(dst: &[mut u8], src: &[const u8], count: uint) {
assert dst.len() >= count;
assert src.len() >= count;
// Bound checks are done at vec::raw::memmove.
unsafe { vec::raw::memmove(dst, src, count) }
}
}