diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 2955717..06d3270 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -259,7 +259,7 @@ impl UI { })?; match Input::from(read()?.clone()) { - Input { key: Key::Esc, .. } => break, + Input { key: Key::Esc, .. } => return Err(Error::msg("Login cancelled by user")), Input { key: Key::Enter, .. @@ -311,7 +311,6 @@ impl UI { } }; } - Ok(()) } pub fn close(&mut self) -> Result<()>{