Skip to content

Commit 249b31b

Browse files
committed
Auto merge of #7428 - alexcrichton:nocapture, r=ehuss
Don't ever capture CPU state if timings are disabled This should initially help with the panic in #7427 but doesn't solve it.
2 parents c59e1f4 + fb80b9e commit 249b31b

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
@@ -138,7 +138,7 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
138138
unit_times: Vec::new(),
139139
active: HashMap::new(),
140140
concurrency: Vec::new(),
141-
last_cpu_state: State::current().ok(),
141+
last_cpu_state: if enabled { State::current().ok() } else { None },
142142
last_cpu_recording: Instant::now(),
143143
cpu_usage: Vec::new(),
144144
}

0 commit comments

Comments
 (0)