Rename variable

This commit is contained in:
Pierre HUBERT 2022-10-18 08:13:25 +02:00
parent be454cce03
commit 915426849b

View File

@ -28,7 +28,7 @@ pub struct ConfirmDialogScreen<'a> {
title: &'a str,
msg: &'a str,
is_confirm: bool,
can_cancel: bool,
can_escape: bool,
}
impl<'a> ConfirmDialogScreen<'a> {
@ -37,7 +37,7 @@ impl<'a> ConfirmDialogScreen<'a> {
title: "Confirmation Request",
msg,
is_confirm: true,
can_cancel: false,
can_escape: false,
}
}
@ -56,7 +56,7 @@ impl<'a> ConfirmDialogScreen<'a> {
if event::poll(timeout)? {
if let Event::Key(key) = event::read()? {
match key.code {
KeyCode::Esc | KeyCode::Char('q') if self.can_cancel => {
KeyCode::Esc | KeyCode::Char('q') if self.can_escape => {
return Ok(ScreenResult::Canceled)
}