diff --git a/profiling/src/allocation.rs b/profiling/src/allocation.rs index a40d8e417f..06b7252f6f 100644 --- a/profiling/src/allocation.rs +++ b/profiling/src/allocation.rs @@ -186,7 +186,7 @@ pub fn alloc_prof_rinit() { let zend_mm_state = cell.get(); // Safety: `zend_mm_get_heap()` always returns a non-null pointer to a valid heap structure - let heap = unsafe { Some(zend::zend_mm_get_heap()).unwrap() }; + let heap = unsafe { zend::zend_mm_get_heap() }; unsafe { ptr::addr_of_mut!((*zend_mm_state).heap).write(Some(heap)) }; diff --git a/profiling/src/logging.rs b/profiling/src/logging.rs index 80a1336cba..3ea22c6e2e 100644 --- a/profiling/src/logging.rs +++ b/profiling/src/logging.rs @@ -1,5 +1,4 @@ use env_logger::Target; -pub use log::Level; pub use log::LevelFilter; use std::fs::File; use std::os::unix::io::FromRawFd; diff --git a/profiling/src/profiling/mod.rs b/profiling/src/profiling/mod.rs index fd9f8b5a78..640c7c8bb9 100644 --- a/profiling/src/profiling/mod.rs +++ b/profiling/src/profiling/mod.rs @@ -771,10 +771,10 @@ impl Profiler { value: LabelValue::Str(exception.clone().into()), }); - if message.is_some() { + if let Some(message) = message { labels.push(Label { key: "exception message", - value: LabelValue::Str(message.unwrap().into()), + value: LabelValue::Str(message.into()), }); }