aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/mod.rs2
-rw-r--r--src/gui/question.rs6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/mod.rs b/src/gui/mod.rs
index b39cbcf..719f39a 100644
--- a/src/gui/mod.rs
+++ b/src/gui/mod.rs
@@ -11,7 +11,7 @@ use std::{fs, io, time::Duration};
use termion::{raw::IntoRawMode, raw::RawTerminal, screen::AlternateScreen};
use tui::{backend::TermionBackend, Terminal};
-type Term = Terminal<TermionBackend<AlternateScreen<RawTerminal<io::Stdout>>>>;
+pub type Term = Terminal<TermionBackend<AlternateScreen<RawTerminal<io::Stdout>>>>;
pub fn terminal() -> Result<Term> {
let stdout = io::stdout().into_raw_mode()?;
diff --git a/src/gui/question.rs b/src/gui/question.rs
index 2060cb7..426daa9 100644
--- a/src/gui/question.rs
+++ b/src/gui/question.rs
@@ -203,7 +203,11 @@ pub fn ask<B: Backend>(
fn is_correct(input: &str, responses: &[String]) -> bool {
// Remove whitespaces
- let input = input.split_whitespace().map(|word| word.trim()).collect::<Vec<&str>>().join(" ");
+ let input = input
+ .split_whitespace()
+ .map(|word| word.trim())
+ .collect::<Vec<&str>>()
+ .join(" ");
responses
.iter()