From 8f30ea0e83becccdf4c73c604aaec21f2b828687 Mon Sep 17 00:00:00 2001 From: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com> Date: Sun, 8 Oct 2023 00:41:50 +0200 Subject: [PATCH] fix: rename unrecoverable to exit --- winapps/src/errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winapps/src/errors.rs b/winapps/src/errors.rs index 0545fed..4d65570 100644 --- a/winapps/src/errors.rs +++ b/winapps/src/errors.rs @@ -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, { - 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.