diff options
| author | Lzu Tao <taolzu@gmail.com> | 2020-01-10 12:52:00 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-01-10 12:52:00 +0000 |
| commit | cd9a73d2ea4ca9452e3471d7e6c04af14eb1c2ed (patch) | |
| tree | 9cc6c46767976077aa615a3c8311a72201fbf376 /src/libpanic_unwind | |
| parent | 2d8d559bbecf6272eb41f8a800e319238aa9d621 (diff) | |
make use of pointer::is_null
Diffstat (limited to 'src/libpanic_unwind')
| -rw-r--r-- | src/libpanic_unwind/emcc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libpanic_unwind/emcc.rs b/src/libpanic_unwind/emcc.rs index 2098404ee1b..9d3fe5254f8 100644 --- a/src/libpanic_unwind/emcc.rs +++ b/src/libpanic_unwind/emcc.rs @@ -63,7 +63,7 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> { pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 { let sz = mem::size_of_val(&data); let exception = __cxa_allocate_exception(sz); - if exception == ptr::null_mut() { + if exception.is_null() { return uw::_URC_FATAL_PHASE1_ERROR as u32; } ptr::write(exception as *mut _, data); |
