Apply review comments
This commit is contained in:
parent
e6c64df274
commit
3f3c498137
2 changed files with 3 additions and 2 deletions
|
|
@ -186,6 +186,8 @@ impl StepMetadata {
|
|||
pub fn get_stage(&self) -> Option<u32> {
|
||||
self.stage.or(self
|
||||
.built_by
|
||||
// For std, its stage corresponds to the stage of the compiler that builds it.
|
||||
// For everything else, a stage N things gets built by a stage N-1 compiler.
|
||||
.map(|compiler| if self.name == "std" { compiler.stage } else { compiler.stage + 1 }))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1667,8 +1667,7 @@ fn render_metadata(metadata: &StepMetadata) -> String {
|
|||
if let Some(compiler) = metadata.built_by {
|
||||
write!(record, "{} -> ", render_compiler(compiler));
|
||||
}
|
||||
let stage =
|
||||
if let Some(stage) = metadata.get_stage() { format!("{stage} ") } else { "".to_string() };
|
||||
let stage = metadata.get_stage().map(|stage| format!("{stage} ")).unwrap_or_default();
|
||||
write!(record, "{} {stage}<{}>", metadata.name, normalize_target(metadata.target));
|
||||
record
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue