From 2bc47940be9359e34cfe50c64fe76234999bc716 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 6 May 2026 04:02:24 +0900 Subject: refactor(console): rename color helpers and migrate call sites to console_format! The six tag-style color functions (info, comment, error, question, highlight, warning) are pub only so that console_format! can call them from generated code; they are not part of the public API. Rename them to __format_*_message to make that intent visible, add a doc-comment saying not to call them directly, and replace every remaining direct call site with console_format!. Co-Authored-By: Claude Sonnet 4.6 --- crates/mozart/src/commands/dependency.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/mozart/src/commands/dependency.rs') diff --git a/crates/mozart/src/commands/dependency.rs b/crates/mozart/src/commands/dependency.rs index d0f2d48..8b84fe4 100644 --- a/crates/mozart/src/commands/dependency.rs +++ b/crates/mozart/src/commands/dependency.rs @@ -650,7 +650,7 @@ pub fn print_table(results: &[DependencyResult], console: &mozart_core::console: if results.is_empty() { console_writeln!( console, - &format!("{}", mozart_core::console::info("No relationships found.")), + &console_format!("No relationships found."), ); return; } @@ -685,10 +685,10 @@ pub fn print_table(results: &[DependencyResult], console: &mozart_core::console: console, &format!( "{:{}", r.package_name), + console_format!("{}", r.package_version), r.link_description, - mozart_core::console::comment(&r.link_constraint), + console_format!("{}", r.link_constraint), name_w = name_w, ver_w = ver_w, desc_w = desc_w, @@ -714,7 +714,7 @@ pub fn print_tree( if results.is_empty() && depth == 0 { console_writeln!( console, - &format!("{}", mozart_core::console::info("No relationships found.")), + &console_format!("No relationships found."), ); return; } @@ -729,10 +729,10 @@ pub fn print_tree( &format!( "{}{:<} {} {} {}", prefix, - mozart_core::console::info(&r.package_name), - mozart_core::console::comment(&r.package_version), + console_format!("{}", r.package_name), + console_format!("{}", r.package_version), r.link_description, - mozart_core::console::comment(&r.link_constraint), + console_format!("{}", r.link_constraint), ), ); -- cgit v1.3.1