Make is_nonoverlapping
#[inline]
It showed up with 3% execution time in a compiler profile.
This commit is contained in:
parent
e29a1530f6
commit
0b59748807
1 changed files with 1 additions and 0 deletions
|
@ -2693,6 +2693,7 @@ pub(crate) fn is_valid_allocation_size(size: usize, len: usize) -> bool {
|
|||
|
||||
/// Checks whether the regions of memory starting at `src` and `dst` of size
|
||||
/// `count * size` do *not* overlap.
|
||||
#[inline]
|
||||
pub(crate) fn is_nonoverlapping(src: *const (), dst: *const (), size: usize, count: usize) -> bool {
|
||||
let src_usize = src.addr();
|
||||
let dst_usize = dst.addr();
|
||||
|
|
Loading…
Add table
Reference in a new issue