From 78776ff4a91c470f075aa5148e48c02ca6e4d050 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 18 Aug 2026 10:59:46 +0800 Subject: refactor(ci-new): extract shared task progress bar helper --- mingling_ci/src/markdown/test.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'mingling_ci/src/markdown') 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 -- cgit