Remove ErrorString

This commit is contained in:
jaby 2022-11-27 22:21:06 +01:00
parent eef5082c93
commit 0a48078345
2 changed files with 1 additions and 11 deletions

View File

@ -1,4 +1,4 @@
pub use tool_helper::{Error, ErrorString};
pub use tool_helper::Error;
pub mod config_reader;
pub mod encoder;

View File

@ -21,10 +21,6 @@ macro_rules! format_if_error {
};
}
pub trait ErrorString {
fn to_string(self) -> String;
}
pub struct Error {
pub exit_code: i32,
pub action: String,
@ -109,12 +105,6 @@ impl std::convert::From<std::convert::Infallible> for Error {
}
}
impl<T: ErrorString> std::convert::From<T> for Error {
fn from(error: T) -> Self {
Error::from_text(error.to_string())
}
}
pub fn prefix_if_error<T>(prefix: &str, result: Result<T, Error>) -> Result<T, Error> {
match result {
Ok(value) => Ok(value),