Always inline compare_bytes::cmp

This commit is contained in:
David Hoppenbrouwers 2022-05-28 00:50:05 +02:00
parent e7a8932e3b
commit 2071d05a19
No known key found for this signature in database
GPG key ID: A9156EA5E4B644FF

View file

@ -103,6 +103,7 @@ pub unsafe fn set_bytes(dest: *mut u8, c: u8, count: usize) {
#[inline(always)]
pub unsafe fn compare_bytes(a: *const u8, b: *const u8, n: usize) -> i32 {
#[inline(always)]
unsafe fn cmp<T, U, F>(mut a: *const T, mut b: *const T, n: usize, f: F) -> i32
where
T: Clone + Copy + Eq,