Fix compile warnings and tweak error message format
Warnings fixed: - Remove unused 'warn' import from retry.rs - Prefix unused 'output' param with underscore - Prefix unused 'rel_start' with underscore - Add #[allow(dead_code)] to G3Status::info() Message format tweaked per feedback: - 'g3: model overloaded [error]' (no attempt info) - 'g3: retrying in 2.2s (1/3) ... [done]' (attempt info moved here) - Handle empty error message in Status::Error to show just '[error]'
This commit is contained in:
@@ -164,6 +164,7 @@ impl G3Status {
|
||||
|
||||
/// Print an info message in dimmed/grey text.
|
||||
/// Format: "... <message>"
|
||||
#[allow(dead_code)]
|
||||
pub fn info(message: &str) {
|
||||
println!(
|
||||
"{}... {}{}",
|
||||
@@ -202,9 +203,13 @@ impl G3Status {
|
||||
ResetColor
|
||||
),
|
||||
Status::Error(msg) => format!(
|
||||
"{}[error: {}]{}",
|
||||
"{}{}{}",
|
||||
SetForegroundColor(Color::Red),
|
||||
msg,
|
||||
if msg.is_empty() {
|
||||
"[error]".to_string()
|
||||
} else {
|
||||
format!("[error: {}]", msg)
|
||||
},
|
||||
ResetColor
|
||||
),
|
||||
Status::Resolved => format!(
|
||||
|
||||
Reference in New Issue
Block a user