nit: cleanup feature status display (#15113) (#15117)

* nit: cleanup feature status display

* nudge

(cherry picked from commit a52a241852)

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2021-02-05 05:38:38 +00:00
committed by GitHub
parent 3838fb62d4
commit 49034b8016
2 changed files with 9 additions and 5 deletions

View File

@ -23,6 +23,10 @@ fi
BENCH_FILE=bench_output.log
BENCH_ARTIFACT=current_bench_results.log
# solana-keygen required when building C programs
_ "$cargo" build --manifest-path=keygen/Cargo.toml
export PATH="$PWD/target/debug":$PATH
# Clear the C dependency files, if dependeny moves these files are not regenerated
test -d target/debug/bpf && find target/debug/bpf -name '*.d' -delete
test -d target/release/bpf && find target/release/bpf -name '*.d' -delete

View File

@ -70,8 +70,8 @@ impl fmt::Display for CliFeatures {
f,
"{}",
style(format!(
"{:<44} {:<40} {}",
"Feature", "Description", "Status"
"{:<44} {:<28} {}",
"Feature", "Status", "Description"
))
.bold()
)?;
@ -79,15 +79,15 @@ impl fmt::Display for CliFeatures {
for feature in &self.features {
writeln!(
f,
"{:<44} {:<40} {}",
"{:<44} {:<28} {}",
feature.id,
feature.description,
match feature.status {
CliFeatureStatus::Inactive => style("inactive".to_string()).red(),
CliFeatureStatus::Pending => style("activation pending".to_string()).yellow(),
CliFeatureStatus::Active(activation_slot) =>
style(format!("active since slot {}", activation_slot)).green(),
}
},
feature.description,
)?;
}
if self.inactive && !self.feature_activation_allowed {