Skip to content

Commit 1d5316c

Browse files
author
mendelsshop
committed
cargo formatted: tui:
added loading ...
1 parent 33e15ba commit 1d5316c

File tree

1 file changed

+12
-9
lines changed
  • cargo-function-history/src/app

1 file changed

+12
-9
lines changed

cargo-function-history/src/app/ui.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,20 @@ fn draw_body<B: Backend>(app: &mut App, mut pos: Rect, frame: &mut Frame<B>) {
100100
};
101101
let tick_text: Vec<Spans> = match &app.cmd_output {
102102
CommandResult::None => match app.status {
103-
Status::Loading =>
104-
vec![Spans::from(format!(
103+
Status::Loading => vec![Spans::from(format!(
105104
"Loading{}",
106-
".".repeat(((std::time::SystemTime::now()
107-
.duration_since(std::time::UNIX_EPOCH)
108-
.expect("Time went backwards")
109-
.as_millis()
110-
/ 100)
111-
% 4) as usize)
105+
".".repeat(
106+
((std::time::SystemTime::now()
107+
.duration_since(std::time::UNIX_EPOCH)
108+
.expect("Time went backwards")
109+
.as_millis()
110+
/ 100)
111+
% 4) as usize
112+
)
112113
))],
113-
_ => vec![Spans::from("Please enter some commands to search for a function.")],
114+
_ => vec![Spans::from(
115+
"Please enter some commands to search for a function.",
116+
)],
114117
},
115118
a => a
116119
.to_string()

0 commit comments

Comments
 (0)