From 6f3802fd9f39c4e5847d130b4417b5cdfb66972d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 22 Feb 2026 22:53:09 +0900 Subject: refactor(console): add console_format! proc macro and migrate all commands Introduce a Symfony Console-style tag macro that replaces verbose patterns like `console::info(&format!("text {name}"))` with `console_format!("text {name}")`. Supports all 6 tag types (info, comment, error, question, highlight, warning) with format argument distribution across multiple tagged segments. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/browse.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/mozart/src/commands/browse.rs') diff --git a/crates/mozart/src/commands/browse.rs b/crates/mozart/src/commands/browse.rs index 51ca340..6586a12 100644 --- a/crates/mozart/src/commands/browse.rs +++ b/crates/mozart/src/commands/browse.rs @@ -1,4 +1,5 @@ use clap::Args; +use mozart_core::console_format; use std::path::{Path, PathBuf}; use std::process::Command; @@ -55,12 +56,9 @@ pub async fn execute( } } None => { - console.info(&format!( - "{}", - mozart_core::console::warning(&format!( - "No URL found for package \"{}\".", - package_name - )) + console.info(&console_format!( + "No URL found for package \"{}\".", + package_name )); exit_code = 1; } -- cgit v1.3.1