mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-06 15:07:36 +00:00
removing checks from vec::bytes::memcpy and memmove as are duplicated from raw::
This commit is contained in:
parent
4096c9f25f
commit
dd73dd0e37
@ -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…
Reference in New Issue
Block a user