aboutsummaryrefslogtreecommitdiff
path: root/src/gui/question.rs
diff options
context:
space:
mode:
authorJoris2025-02-07 11:37:33 +0100
committerJoris2025-02-07 11:37:33 +0100
commitf7afa9cf50a9459f41146ca5cb009eab69b76c5f (patch)
treec459003eb8aaf600ce35b567f74dd01e83327485 /src/gui/question.rs
parentb24dda856ddc1317816f6ab156096528e23d724c (diff)
Upgrade dependencies
Diffstat (limited to 'src/gui/question.rs')
-rw-r--r--src/gui/question.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/question.rs b/src/gui/question.rs
index 512ca49..2a42e57 100644
--- a/src/gui/question.rs
+++ b/src/gui/question.rs
@@ -50,7 +50,7 @@ pub fn ask<B: Backend>(terminal: &mut Terminal<B>, title: &str, card: &Card) ->
]
.as_ref(),
)
- .split(f.size());
+ .split(f.area());
let d1 = util::title(title);
f.render_widget(d1, chunks[0]);
@@ -232,10 +232,7 @@ fn remove_whitespaces(input: &str) -> String {
}
fn remove_indications_and_phonetics(response: &str) -> &str {
- response
- .split(|c| c == '(' || c == '[')
- .collect::<Vec<&str>>()[0]
- .trim()
+ response.split(['(', '[']).collect::<Vec<&str>>()[0].trim()
}
fn extract_phonetics(response: &str) -> Option<String> {