mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Style update.
This commit is contained in:
parent
6c6aa97534
commit
aae1416cbd
@ -179,13 +179,15 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
|
||||
// `id` may not always be active. "fresh" units unconditionally
|
||||
// generate `Message::Finish`, but this active map only tracks dirty
|
||||
// units.
|
||||
if let Some(unit_time) = self.active.get_mut(&id) {
|
||||
let unit_time = match self.active.get_mut(&id) {
|
||||
Some(ut) => ut,
|
||||
None => return,
|
||||
};
|
||||
let t = d_as_f64(self.start.elapsed());
|
||||
unit_time.rmeta_time = Some(t - unit_time.start);
|
||||
assert!(unit_time.unlocked_rmeta_units.is_empty());
|
||||
unit_time.unlocked_rmeta_units.extend(unlocked);
|
||||
}
|
||||
}
|
||||
|
||||
/// Mark that a unit has finished running.
|
||||
pub fn unit_finished(&mut self, id: u32, unlocked: Vec<&Unit<'a>>) {
|
||||
@ -193,7 +195,10 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
|
||||
return;
|
||||
}
|
||||
// See note above in `unit_rmeta_finished`, this may not always be active.
|
||||
if let Some(mut unit_time) = self.active.remove(&id) {
|
||||
let mut unit_time = match self.active.remove(&id) {
|
||||
Some(ut) => ut,
|
||||
None => return,
|
||||
};
|
||||
let t = d_as_f64(self.start.elapsed());
|
||||
unit_time.duration = t - unit_time.start;
|
||||
assert!(unit_time.unlocked_units.is_empty());
|
||||
@ -205,8 +210,8 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
|
||||
unit_time.target,
|
||||
unit_time.duration
|
||||
);
|
||||
let _ =
|
||||
self.config
|
||||
let _ = self
|
||||
.config
|
||||
.shell()
|
||||
.status_with_color("Completed", msg, termcolor::Color::Cyan);
|
||||
}
|
||||
@ -223,7 +228,6 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
|
||||
}
|
||||
self.unit_times.push(unit_time);
|
||||
}
|
||||
}
|
||||
|
||||
/// This is called periodically to mark the concurrency of internal structures.
|
||||
pub fn mark_concurrency(&mut self, active: usize, waiting: usize, inactive: usize) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user