forked from trinitrix/core
fix (UI): fixed a bug that caused a panic when cancelling a login process.
This commit is contained in:
parent
aee5b77722
commit
82bd751ac8
|
@ -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<()>{
|
||||
|
|
Loading…
Reference in New Issue