removing checks from vec::bytes::memcpy and memmove as are duplicated from raw::
This commit is contained in:
parent
4096c9f25f
commit
dd73dd0e37
1 changed files with 2 additions and 6 deletions
|
|
@ -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) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue