Setup of update and render loop for CUI

This commit is contained in:
2023-07-09 14:40:44 +02:00
parent 50c211d93f
commit ceb275cf22
4 changed files with 118 additions and 47 deletions

View File

@@ -114,6 +114,12 @@ impl std::convert::From<std::convert::Infallible> for Error {
}
}
impl std::convert::From<std::sync::mpsc::RecvError> for Error {
fn from(error: std::sync::mpsc::RecvError) -> Self {
Error::from_error(error)
}
}
pub fn exit_with_error(error: Error) {
error.print_to_std_err();
std::process::exit(error.exit_code);