Skip to content

Commit

Permalink
make the expression more logical
Browse files Browse the repository at this point in the history
  • Loading branch information
realFlowControl committed Dec 14, 2023
1 parent 4076840 commit cb9c050
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions profiling/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ pub(crate) unsafe fn profiling_endpoint_collection_enabled() -> bool {
/// This function must only be called after config has been initialized in
/// rinit, and before it is uninitialized in mshutdown.
pub(crate) unsafe fn profiling_experimental_cpu_time_enabled() -> bool {
profiling_experimental_features_enabled()
|| profiling_enabled() && get_bool(ProfilingExperimentalCpuTimeEnabled, true)
profiling_enabled()
&& (profiling_experimental_features_enabled()
|| get_bool(ProfilingExperimentalCpuTimeEnabled, true))
}

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

/// # Safety
Expand Down

0 comments on commit cb9c050

Please sign in to comment.