diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-19 05:54:00 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-19 06:15:20 +0800 |
| commit | ec9edc294fd5e7e29977fc7b0e6fb953422bc0e2 (patch) | |
| tree | bbf89ef4457b8de8a8a9bca5668045d612d27572 /mingling_ci/src/cmd/cmd_show_manifests.rs | |
| parent | 06dfc27194c11e1d1033c292c759a1c5d82e780b (diff) | |
Move CI, dev tools, and configs from root-level scattered locations into
a
unified `dev/` directory structure. Update all references across build
scripts, documentation, and editor configurations.
Also consolidate editor config generation into build.rs for automated
synchronization of rust-analyzer settings across VS Code and Zed.
Diffstat (limited to 'mingling_ci/src/cmd/cmd_show_manifests.rs')
| -rw-r--r-- | mingling_ci/src/cmd/cmd_show_manifests.rs | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/mingling_ci/src/cmd/cmd_show_manifests.rs b/mingling_ci/src/cmd/cmd_show_manifests.rs deleted file mode 100644 index 2be82d2..0000000 --- a/mingling_ci/src/cmd/cmd_show_manifests.rs +++ /dev/null @@ -1,71 +0,0 @@ -use std::path::PathBuf; - -use mingling::{ - Grouped, - macros::{buffer, command, r_println, renderer}, -}; - -use prettytable::{ - Cell, Row, Table, - format::{FormatBuilder, LinePosition, LineSeparator}, -}; - -use crate::res::Manifests; - -#[command(node = "show-manifests")] -pub fn show_manifests(manifests: &Manifests) -> ResultPrintManifests { - let mut entries: Vec<ManifestEntry> = manifests - .package_dirs - .iter() - .map(|(name, path)| ManifestEntry { - name: name.clone(), - path: path.clone(), - }) - .collect(); - entries.sort_by(|a, b| a.path.cmp(&b.path)); - ResultPrintManifests { entries } -} - -/// All manifests the CI will check, sorted by path. -#[derive(Grouped)] -pub struct ResultPrintManifests { - pub entries: Vec<ManifestEntry>, -} - -#[derive(Debug, Clone)] -pub struct ManifestEntry { - pub name: String, - pub path: PathBuf, -} - -#[renderer(buffer)] -pub fn render_print_manifests(r: ResultPrintManifests) { - let mut table = Table::new(); - - table.set_format( - FormatBuilder::new() - .column_separator('│') - .borders('│') - .separator(LinePosition::Top, LineSeparator::new('─', '┬', '┌', '┐')) - .separator(LinePosition::Title, LineSeparator::new('─', '┼', '├', '┤')) - .separator(LinePosition::Bottom, LineSeparator::new('─', '┴', '└', '┘')) - .padding(1, 1) - .build(), - ); - - table.set_titles(Row::new(vec![ - Cell::new("#"), - Cell::new("Package-Name"), - Cell::new("Package-Path"), - ])); - - for (index, entry) in r.entries.iter().enumerate() { - table.add_row(Row::new(vec![ - Cell::new(&(index + 1).to_string()), - Cell::new(&entry.name), - Cell::new(&entry.path.to_string_lossy()), - ])); - } - - r_println!("{table}"); -} |
