We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4096c9f commit dd73dd0Copy full SHA for dd73dd0
src/libcore/vec.rs
@@ -2041,9 +2041,7 @@ pub mod bytes {
2041
* may not overlap.
2042
*/
2043
pub fn memcpy(dst: &[mut u8], src: &[const u8], count: uint) {
2044
- assert dst.len() >= count;
2045
- assert src.len() >= count;
2046
-
+ // Bound checks are done at vec::raw::memcpy.
2047
unsafe { vec::raw::memcpy(dst, src, count) }
2048
}
2049
@@ -2054,9 +2052,7 @@ pub mod bytes {
2054
2052
* may overlap.
2055
2053
2056
pub fn memmove(dst: &[mut u8], src: &[const u8], count: uint) {
2057
2058
2059
+ // Bound checks are done at vec::raw::memmove.
2060
unsafe { vec::raw::memmove(dst, src, count) }
2061
2062
0 commit comments