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/licenses.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/mozart/src/commands/licenses.rs') diff --git a/crates/mozart/src/commands/licenses.rs b/crates/mozart/src/commands/licenses.rs index dc232e9..7515b32 100644 --- a/crates/mozart/src/commands/licenses.rs +++ b/crates/mozart/src/commands/licenses.rs @@ -1,6 +1,7 @@ use clap::Args; use indexmap::IndexSet; use mozart_core::console::Console; +use mozart_core::console_format; use mozart_core::console_writeln; use serde::Serialize; use std::path::Path; @@ -198,18 +199,15 @@ fn render_text( }; console_writeln!( console, - &format!("Name: {}", mozart_core::console::comment(root_name)), + &console_format!("Name: {root_name}"), ); console_writeln!( console, - &format!("Version: {}", mozart_core::console::comment(root_version)), + &console_format!("Version: {root_version}"), ); console_writeln!( console, - &format!( - "Licenses: {}", - mozart_core::console::comment(&license_display) - ), + &console_format!("Licenses: {license_display}"), ); console_writeln!(console, "Dependencies:"); console_writeln!(console, ""); -- cgit v1.3.1