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/update.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'crates/mozart/src/commands/update.rs') diff --git a/crates/mozart/src/commands/update.rs b/crates/mozart/src/commands/update.rs index 79fd7ba..2e93a0c 100644 --- a/crates/mozart/src/commands/update.rs +++ b/crates/mozart/src/commands/update.rs @@ -1,6 +1,5 @@ use clap::Args; use indexmap::{IndexMap, IndexSet}; -use mozart_core::console; use mozart_core::console_format; use mozart_core::package::{self, Stability}; use mozart_registry::lockfile; @@ -536,10 +535,10 @@ pub fn expand_wildcards( } } if !matched { - console.info(&console::warning(&format!( - "Package '{}' listed for update is not in the lock file. Specifier will be ignored.", + console.info(&console_format!( + "Package '{}' listed for update is not in the lock file. Specifier will be ignored.", spec - ))); + )); } } @@ -814,8 +813,8 @@ pub fn interactive_select_packages( let stdin = io::stdin(); if !stdin.is_terminal() { - console.info(&console::warning( - "Interactive mode requires a TTY. Running non-interactively with all packages.", + console.info(&console_format!( + "Interactive mode requires a TTY. Running non-interactively with all packages." )); return packages; } -- cgit v1.3.1