Skip to content

Commit

Permalink
console: spell out ASCII state with BUSY/IDLE/DONE (console-rs#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Sep 9, 2021
1 parent d6d5074 commit 926de99
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions console/src/tasks.rs
Expand Up @@ -722,11 +722,12 @@ impl TaskState {
const IDLE_UTF8: &str = "\u{23F8}";
const COMPLETED_UTF8: &str = "\u{23F9}";
match self {
Self::Running => {
Span::styled(styles.if_utf8(RUNNING_UTF8, ">"), styles.fg(Color::Green))
}
Self::Idle => Span::raw(styles.if_utf8(IDLE_UTF8, ":")),
Self::Completed => Span::raw(styles.if_utf8(COMPLETED_UTF8, "!")),
Self::Running => Span::styled(
styles.if_utf8(RUNNING_UTF8, "BUSY"),
styles.fg(Color::Green),
),
Self::Idle => Span::raw(styles.if_utf8(IDLE_UTF8, "IDLE")),
Self::Completed => Span::raw(styles.if_utf8(COMPLETED_UTF8, "DONE")),
}
}
}

0 comments on commit 926de99

Please sign in to comment.