fix: rename unrecoverable to exit

This commit is contained in:
Oskar Manhart 2023-10-08 00:41:50 +02:00
parent 2124e49db1
commit 8f30ea0e83

View File

@ -31,7 +31,7 @@ impl WinappsError {
}
/// This function prints the error to the console and exits the program with an exit code of 1.
pub fn unrecoverable(&self) -> ! {
pub fn exit(&self) -> ! {
self.error();
tracing::error!("Unrecoverable error, exiting...");
@ -102,7 +102,7 @@ where
T: Sized + Debug,
U: IntoError<T>,
{
val.into_error(msg).unwrap_or_else(|e| e.unrecoverable())
val.into_error(msg).unwrap_or_else(|e| e.exit())
}
/// This function unwraps a `Result` or `Option` and returns the value if it exists.