diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-18 10:59:46 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-18 10:59:46 +0800 |
| commit | 78776ff4a91c470f075aa5148e48c02ca6e4d050 (patch) | |
| tree | b072f4ca72679be50c1fe155b1651ded82cad4e7 /mingling_ci/src/markdown | |
| parent | b47a1fb1dd5b82ba14bcf8589c5b2a604569bf19 (diff) | |
refactor(ci-new): extract shared task progress bar helper
Diffstat (limited to 'mingling_ci/src/markdown')
| -rw-r--r-- | mingling_ci/src/markdown/test.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/mingling_ci/src/markdown/test.rs b/mingling_ci/src/markdown/test.rs index f8bd1f7..8ecf18d 100644 --- a/mingling_ci/src/markdown/test.rs +++ b/mingling_ci/src/markdown/test.rs @@ -4,7 +4,8 @@ use std::collections::BTreeMap; use std::path::{Path, PathBuf}; use colored::Colorize; -use indicatif::{ProgressBar, ProgressStyle}; + +use crate::progress::task_progress_bar; use super::project::{ MarkdownTestProject, generate_build_rs, generate_cargo_toml, generate_main_rs, @@ -37,16 +38,7 @@ pub(crate) async fn try_test_markdown_project( } let total: usize = groups.values().map(Vec::len).sum(); - let pb = ProgressBar::new(total as u64); - pb.set_style( - ProgressStyle::default_bar() - .template(&format!( - "{} [{{bar:28}}] {{pos}}/{{len}}: {{msg}}", - " Testing".bold().bright_cyan() - )) - .unwrap() - .progress_chars("=> "), - ); + let pb = task_progress_bar(total, "Testing"); pb.set_message("blocks"); // One blocking task per group; blocks within a group are serial because |
