mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
removing checks from vec::bytes::memcpy and memmove as are duplicated from raw::
This commit is contained in:
+2
-6
@@ -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 fn memcpy(dst: &[mut u8], src: &[const u8], count: uint) {
|
||||
* 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) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user