Rename variable
This commit is contained in:
		@@ -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)
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user