We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9cdf47 commit 830f631Copy full SHA for 830f631
1 file changed
src/main.rs
@@ -1,9 +1,26 @@
1
use codspeed_runner::{clean_logger, cli};
2
-use console::style;
+use console::{Term, style};
3
use log::log_enabled;
4
5
+struct HiddenCursor(Term);
6
+
7
+impl HiddenCursor {
8
+ fn new() -> Self {
9
+ let term = Term::stderr();
10
+ let _ = term.hide_cursor();
11
+ Self(term)
12
+ }
13
+}
14
15
+impl Drop for HiddenCursor {
16
+ fn drop(&mut self) {
17
+ let _ = self.0.show_cursor();
18
19
20
21
#[tokio::main(flavor = "current_thread")]
22
async fn main() {
23
+ let _cursor = HiddenCursor::new();
24
let res = cli::run().await;
25
if let Err(err) = res {
26
// Show the primary error
0 commit comments