fix(rust): address new nightly lint for pointer comparisons

(cherry picked from commit 521da2b0a7)
This commit is contained in:
WillLillis 2025-03-26 01:43:13 -04:00 committed by Christian Clason
parent ed69a74463
commit fae24b6da6
2 changed files with 2 additions and 2 deletions

View file

@ -109,7 +109,7 @@ unsafe extern "C" fn ts_record_realloc(ptr: *mut c_void, size: usize) -> *mut c_
let result = realloc(ptr, size);
if ptr.is_null() {
record_alloc(result);
} else if ptr != result {
} else if !core::ptr::eq(ptr, result) {
record_dealloc(ptr);
record_alloc(result);
}

View file

@ -108,7 +108,7 @@ unsafe extern "C" fn ts_record_realloc(ptr: *mut c_void, size: usize) -> *mut c_
let result = realloc(ptr, size);
if ptr.is_null() {
record_alloc(result);
} else if ptr != result {
} else if !core::ptr::eq(ptr, result) {
record_dealloc(ptr);
record_alloc(result);
}