chore: removed some whitespace
This commit is contained in:
parent
12d9c3de4b
commit
0727857f4f
|
@ -155,7 +155,6 @@ impl Spinner {
|
||||||
///
|
///
|
||||||
pub fn stop(mut self) {
|
pub fn stop(mut self) {
|
||||||
self.stop_spinner_thread();
|
self.stop_spinner_thread();
|
||||||
|
|
||||||
// print message
|
// print message
|
||||||
println!("{}", self.msg);
|
println!("{}", self.msg);
|
||||||
}
|
}
|
||||||
|
@ -176,7 +175,6 @@ impl Spinner {
|
||||||
///
|
///
|
||||||
pub fn stop_with_message(mut self, msg: StringLiteral) {
|
pub fn stop_with_message(mut self, msg: StringLiteral) {
|
||||||
self.stop_spinner_thread();
|
self.stop_spinner_thread();
|
||||||
|
|
||||||
// put the message over the spinner
|
// put the message over the spinner
|
||||||
println!("{}", msg);
|
println!("{}", msg);
|
||||||
}
|
}
|
||||||
|
@ -316,6 +314,7 @@ impl Spinner {
|
||||||
.store(false, std::sync::atomic::Ordering::Relaxed);
|
.store(false, std::sync::atomic::Ordering::Relaxed);
|
||||||
|
|
||||||
// Wait for the thread to actually stop
|
// Wait for the thread to actually stop
|
||||||
|
// Also deletes the last line of the terminal after stopped
|
||||||
self.thread_handle
|
self.thread_handle
|
||||||
.take()
|
.take()
|
||||||
.expect("Stopping the spinner thread should only happen once.")
|
.expect("Stopping the spinner thread should only happen once.")
|
||||||
|
|
|
@ -4,7 +4,6 @@ use yansi::Paint;
|
||||||
|
|
||||||
pub fn delete_last_line(clear_length: usize) {
|
pub fn delete_last_line(clear_length: usize) {
|
||||||
let mut stdout_lock = stdout().lock();
|
let mut stdout_lock = stdout().lock();
|
||||||
|
|
||||||
write!(stdout_lock, "\r").unwrap();
|
write!(stdout_lock, "\r").unwrap();
|
||||||
for _ in 0..clear_length {
|
for _ in 0..clear_length {
|
||||||
write!(stdout_lock, " ").unwrap();
|
write!(stdout_lock, " ").unwrap();
|
||||||
|
|
Loading…
Reference in a new issue