remove a couple warnings

This commit is contained in:
andromeda
2026-04-15 12:41:40 +02:00
parent d24c653bd2
commit 4770f441d1

View File

@@ -59,7 +59,7 @@ fn prompt(anki: &AnkiClient) {
KeyCode::Enter => break,
_ => (),
},
e => (),
_ => (),
};
}
anki.request(GuiShowAnswerRequest {}).unwrap();
@@ -71,13 +71,13 @@ fn prompt(anki: &AnkiClient) {
}
display_prompt_text(":");
let ease = loop {
let ease = match event::read().unwrap() {
match event::read().unwrap() {
Event::Key(e) => match e.code {
KeyCode::Char(AGAIN) => break Ease::Again,
KeyCode::Char(GOOD) => break Ease::Good,
_ => (),
},
e => (),
_ => (),
};
};
anki.request(GuiAnswerCardRequest { ease: ease }).unwrap();
@@ -105,7 +105,8 @@ fn clear_with_bar(anki: &AnkiClient, current_card: &GuiCurrentCardResponse) {
SetForegroundColor(Color::Green),
Print(&format!("{:?}\n", deck_stats.review_count)),
ResetColor
);
)
.unwrap();
}
fn clear_screen() {
@@ -114,7 +115,8 @@ fn clear_screen() {
Clear(ClearType::All),
cursor::MoveTo(0, 0),
cursor::Hide
);
)
.unwrap();
}
fn display_prompt_text(text: &str) {
@@ -123,7 +125,8 @@ fn display_prompt_text(text: &str) {
SetForegroundColor(Color::Blue),
Print(text),
ResetColor
);
)
.unwrap();
}
fn display_html(html: &str) {
@@ -137,5 +140,6 @@ fn display_text(text: &str) {
SetForegroundColor(Color::DarkYellow),
Print(text),
ResetColor
);
)
.unwrap();
}