diff options
Diffstat (limited to 'src/gui/mod.rs')
-rw-r--r-- | src/gui/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/mod.rs b/src/gui/mod.rs index 1053de1..b500706 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -4,10 +4,10 @@ pub mod util; use crate::{db, space_repetition, util::time}; use anyhow::Result; +use crossterm::terminal; use rusqlite::Connection; use std::io::Stdout; use tui::{backend::CrosstermBackend, Terminal}; -use crossterm::{terminal}; pub type Term = Terminal<CrosstermBackend<Stdout>>; @@ -36,7 +36,12 @@ pub fn start( loop { let now = time::seconds_since_unix_epoch()?; - let title = title(deck_name, answers, db::count_available(conn).unwrap_or(0), hide_progress); + let title = title( + deck_name, + answers, + db::count_available(conn).unwrap_or(0), + hide_progress, + ); match db::pick_random_ready(conn) { Some(card) => match question::ask(term, &title, &card)? { |