From 337bf118d4ee987fe25fe177c1a828b2427fa157 Mon Sep 17 00:00:00 2001 From: ad4mx Date: Tue, 19 Jul 2022 19:24:46 +0200 Subject: [PATCH] new: add .fail() printing to stderr --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ee1fb0e..23def2b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -223,7 +223,7 @@ impl Spinner { ); } - /// Deletes the last line of the terminal and prints a failure symbol with a message. + /// Deletes the last line of the terminal and prints a failure symbol with a message to stderr. /// /// # Example /// @@ -239,7 +239,7 @@ impl Spinner { /// pub fn fail(mut self, msg: StringLiteral) { self.stop_spinner_thread(); - println!("{} {}", init_color(Some(Color::Red), "✖".to_string()), &msg); + eprintln!("{} {}", init_color(Some(Color::Red), "✖".to_string()), &msg); } /// Deletes the last line of the terminal and prints a warning symbol with a message.