Add minor refactorings (#754)

This commit is contained in:
Marcin Puc
2021-09-04 20:01:19 +02:00
committed by GitHub
parent 7db0c03621
commit 1478d079ca
21 changed files with 119 additions and 147 deletions

View File

@@ -405,16 +405,10 @@ fn run() -> Result<()> {
print_info("\n(R)eboot\n(S)hell\n(Q)uit");
loop {
match get_key() {
Ok(Key::Char('s')) | Ok(Key::Char('S')) => {
run_shell();
}
Ok(Key::Char('r')) | Ok(Key::Char('R')) => {
reboot();
}
Ok(Key::Char('q')) | Ok(Key::Char('Q')) => (),
_ => {
continue;
}
Ok(Key::Char('s' | 'S')) => run_shell(),
Ok(Key::Char('r' | 'R')) => reboot(),
Ok(Key::Char('q' | 'Q')) => (),
_ => continue,
}
break;
}