Skip to content

Commit

Permalink
Don't ever capture CPU state if timings are disabled
Browse files Browse the repository at this point in the history
This should initially help with the panic in #7427 but doesn't solve it.
  • Loading branch information
alexcrichton committed Sep 25, 2019
1 parent 400221e commit fb80b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/timings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
unit_times: Vec::new(),
active: HashMap::new(),
concurrency: Vec::new(),
last_cpu_state: State::current().ok(),
last_cpu_state: if enabled { State::current().ok() } else { None },
last_cpu_recording: Instant::now(),
cpu_usage: Vec::new(),
}
Expand Down

0 comments on commit fb80b9e

Please sign in to comment.