diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-06 04:02:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-06 04:05:13 +0900 |
| commit | 2bc47940be9359e34cfe50c64fe76234999bc716 (patch) | |
| tree | 52859450ba8704df79d22917aa132fc5b3a702a6 /crates/mozart/src/commands/dependency.rs | |
| parent | bf96f8292c0e9818c8b5fc8713ca7506e4338a49 (diff) | |
| download | php-mozart-2bc47940be9359e34cfe50c64fe76234999bc716.tar.gz php-mozart-2bc47940be9359e34cfe50c64fe76234999bc716.tar.zst php-mozart-2bc47940be9359e34cfe50c64fe76234999bc716.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/dependency.rs')
| -rw-r--r-- | crates/mozart/src/commands/dependency.rs | 16 |
1 files changed, 8 insertions, 8 deletions
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!("<info>No relationships found.</info>"), ); return; } @@ -685,10 +685,10 @@ pub fn print_table(results: &[DependencyResult], console: &mozart_core::console: console, &format!( "{:<name_w$} {:<ver_w$} {:<desc_w$} {}", - mozart_core::console::info(&r.package_name), - mozart_core::console::comment(&r.package_version), + console_format!("<info>{}</info>", r.package_name), + console_format!("<comment>{}</comment>", r.package_version), r.link_description, - mozart_core::console::comment(&r.link_constraint), + console_format!("<comment>{}</comment>", 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!("<info>No relationships found.</info>"), ); 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!("<info>{}</info>", r.package_name), + console_format!("<comment>{}</comment>", r.package_version), r.link_description, - mozart_core::console::comment(&r.link_constraint), + console_format!("<comment>{}</comment>", r.link_constraint), ), ); |
