Skip to content

Commit

Permalink
fmt fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arteiii committed Apr 24, 2024
1 parent 16da1eb commit 6d0f235
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
5 changes: 1 addition & 4 deletions examples/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ fn main() {
Frames::short_loading_bar_with_arrow(),
"short_loading_bar_with_arrow"
);
test_predefined_animation!(
Frames::loading_bar_with_arrow(),
"loading_bar_with_arrow"
);
test_predefined_animation!(Frames::loading_bar_with_arrow(), "loading_bar_with_arrow");
test_predefined_animation!(Frames::speaker(), "speaker");
test_predefined_animation!(Frames::finger_dance(), "finger_dance");
test_predefined_animation!(Frames::fist_bump(), "fist_bump");
Expand Down
2 changes: 1 addition & 1 deletion examples/multi_spinner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn main() {
sleep(Duration::from_secs(2));
spinner.set_text(&spinner1, "spinner1 stopped".to_string());
spinner.stop(&spinner1);

spinner.show_line_number();

sleep(Duration::from_secs(9));
Expand Down
2 changes: 1 addition & 1 deletion src/menu/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::path::Path;

use crossterm::{
cursor, execute,
terminal::{Clear, ClearType, disable_raw_mode, enable_raw_mode},
terminal::{disable_raw_mode, enable_raw_mode, Clear, ClearType},
};
use regex::Regex;

Expand Down
4 changes: 1 addition & 3 deletions src/spinner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ use std::sync::{Arc, Mutex};
use std::thread;
use std::time::Duration;


pub use frames::*;

use crate::iterators::balanced_iterator;
use crate::style::{Attribute, Color, ContentStyle,StyledString};
use crate::style;
use crate::style::{Attribute, Color, ContentStyle, StyledString};
use crate::terminal::{console_cursor, console_render};

pub mod frames;
Expand Down Expand Up @@ -308,7 +307,6 @@ impl MultiSpinner {
console_render::push_unstyled_spaces!(combined_vec, 1);
}


// always include spinner text
combined_vec.push(spinner.text.clone());

Expand Down
14 changes: 7 additions & 7 deletions src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ pub(crate) mod console_render {
}

macro_rules! push_unstyled_spaces {
($vec:expr, $count:expr) => {{
for _ in 0..$count {
$vec.push(StyledString::new(" "));
}
}};
}
($vec:expr, $count:expr) => {{
for _ in 0..$count {
$vec.push(StyledString::new(" "));
}
}};
}

pub(crate) use push_styled_string;
pub(crate) use raw_mode_wrapper;
pub(crate) use push_unstyled_spaces;
pub(crate) use raw_mode_wrapper;

pub fn render_line(frame: &Vec<String>, row: u16) {
let mut stdout = stdout();
Expand Down

0 comments on commit 6d0f235

Please sign in to comment.