Skip to content

Commit cb9c050

Browse files
make the expression more logical
1 parent 4076840 commit cb9c050

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

profiling/src/config.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ pub(crate) unsafe fn profiling_endpoint_collection_enabled() -> bool {
216216
/// This function must only be called after config has been initialized in
217217
/// rinit, and before it is uninitialized in mshutdown.
218218
pub(crate) unsafe fn profiling_experimental_cpu_time_enabled() -> bool {
219-
profiling_experimental_features_enabled()
220-
|| profiling_enabled() && get_bool(ProfilingExperimentalCpuTimeEnabled, true)
219+
profiling_enabled()
220+
&& (profiling_experimental_features_enabled()
221+
|| get_bool(ProfilingExperimentalCpuTimeEnabled, true))
221222
}
222223

223224
/// # Safety
@@ -231,8 +232,9 @@ pub(crate) unsafe fn profiling_allocation_enabled() -> bool {
231232
/// This function must only be called after config has been initialized in
232233
/// rinit, and before it is uninitialized in mshutdown.
233234
pub(crate) unsafe fn profiling_experimental_timeline_enabled() -> bool {
234-
profiling_experimental_features_enabled()
235-
|| profiling_enabled() && get_bool(ProfilingExperimentalTimelineEnabled, false)
235+
profiling_enabled()
236+
&& (profiling_experimental_features_enabled()
237+
|| get_bool(ProfilingExperimentalTimelineEnabled, false))
236238
}
237239

238240
/// # Safety

0 commit comments

Comments
 (0)