1
Fork 0
mirror of https://github.com/RGBCube/dix synced 2025-07-28 12:17:45 +00:00

print: clean up printing

This commit is contained in:
Bloxx12 2025-05-06 22:20:51 +02:00
parent 78b3e4e3a9
commit 0e27617587
No known key found for this signature in database

View file

@ -54,13 +54,7 @@ pub fn print_added(set: &HashSet<&str>, post: &HashMap<&str, HashSet<&str>>, col
let mut version_vec = ver.iter().copied().collect::<Vec<_>>(); let mut version_vec = ver.iter().copied().collect::<Vec<_>>();
version_vec.sort_unstable(); version_vec.sort_unstable();
let version_str = version_vec.join(", "); let version_str = version_vec.join(", ");
println!( println!("[{}] {:col_width$} {}", "A:".green().bold(), p, version_str);
"[{}] {:col_width$} {} {}",
"A:".green().bold(),
p,
"@".yellow().bold(),
version_str
);
} }
} }
@ -81,13 +75,7 @@ pub fn print_removed(set: &HashSet<&str>, pre: &HashMap<&str, HashSet<&str>>, co
let mut version_vec = ver.iter().copied().collect::<Vec<_>>(); let mut version_vec = ver.iter().copied().collect::<Vec<_>>();
version_vec.sort_unstable(); version_vec.sort_unstable();
let version_str = version_vec.join(", "); let version_str = version_vec.join(", ");
println!( println!("[{}] {:col_width$} {}", "R:".red().bold(), p, version_str);
"[{}] {:col_width$} {} {}",
"R:".red().bold(),
p,
"@".yellow(),
version_str
);
} }
} }
@ -141,10 +129,9 @@ pub fn print_changes(
} }
println!( println!(
"[{}] {:col_width$} {} {} ~> {}", "[{}] {:col_width$} {} ~> {}",
"C:".bold().bright_yellow(), "C:".bold().bright_yellow(),
p, p,
"@".yellow(),
diffed_pre, diffed_pre,
diffed_post diffed_post
); );