diff --git a/src/dialogs.rs b/src/dialogs.rs index cbfe754..dbf6a73 100644 --- a/src/dialogs.rs +++ b/src/dialogs.rs @@ -33,7 +33,7 @@ impl<'a> Confirmation<'a> { pub fn ask(&self, substitute: Option<&'a str>) -> crate::Result { let message = match (self.placeholder, substitute) { (None, _) => Cow::Borrowed(self.prompt), - (Some(_), None) => return Err(crate::Error::InternalError), + (Some(_), None) => unreachable!("dev error, should be reported, we checked this won't happen"), (Some(placeholder), Some(subs)) => Cow::Owned(self.prompt.replace(placeholder, subs)), }; diff --git a/src/error.rs b/src/error.rs index 7b8102b..e51449d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -35,8 +35,6 @@ pub enum Error { /// TO BE REMOVED UnsupportedZipArchive(&'static str), /// TO BE REMOVED - InternalError, - /// TO BE REMOVED CompressingRootFolder, /// TO BE REMOVED MissingArgumentsForCompression, @@ -151,13 +149,6 @@ impl fmt::Display for Error { .hint("") .hint("Example: `ouch decompress imgs.tar.gz`") } - Error::InternalError => { - FinalError::with_title("InternalError :(") - .detail("This should not have happened") - .detail("It's probably our fault") - .detail("Please help us improve by reporting the issue at:") - .detail(format!(" {}https://github.com/ouch-org/ouch/issues ", *CYAN)) - } Error::IoError { reason } => FinalError::with_title(reason), Error::CompressionTypo => { FinalError::with_title("Possible typo detected")