Skip to content

Commit 4b105b6

Browse files
committed
Auto merge of #7430 - alexcrichton:beta-next, r=ehuss
[beta] Don't ever capture CPU state if timings are disabled This is a beta backport of #7428 to fix builds on beta
2 parents 7d1d5fd + 9ccb85d commit 4b105b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/compiler/timings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
142142
unit_times: Vec::new(),
143143
active: HashMap::new(),
144144
concurrency: Vec::new(),
145-
last_cpu_state: State::current().ok(),
145+
last_cpu_state: if enabled { State::current().ok() } else { None },
146146
last_cpu_recording: Instant::now(),
147147
cpu_usage: Vec::new(),
148148
}

0 commit comments

Comments
 (0)