Setup of update and render loop for CUI

This commit is contained in:
Jaby Blubb
2023-07-09 14:40:44 +02:00
parent 17a38183cf
commit 88afc628bc
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);