From 0a480783450dc5c26ed5748d1f4396e0565a694d Mon Sep 17 00:00:00 2001 From: jaby Date: Sun, 27 Nov 2022 22:21:06 +0100 Subject: [PATCH] Remove ErrorString --- src/Tools/psxcdgen_ex/src/lib.rs | 2 +- src/Tools/tool_helper/src/lib.rs | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Tools/psxcdgen_ex/src/lib.rs b/src/Tools/psxcdgen_ex/src/lib.rs index cbea0de6..fdf4bb39 100644 --- a/src/Tools/psxcdgen_ex/src/lib.rs +++ b/src/Tools/psxcdgen_ex/src/lib.rs @@ -1,4 +1,4 @@ -pub use tool_helper::{Error, ErrorString}; +pub use tool_helper::Error; pub mod config_reader; pub mod encoder; diff --git a/src/Tools/tool_helper/src/lib.rs b/src/Tools/tool_helper/src/lib.rs index e2d79eea..9310adb4 100644 --- a/src/Tools/tool_helper/src/lib.rs +++ b/src/Tools/tool_helper/src/lib.rs @@ -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 for Error { } } -impl std::convert::From for Error { - fn from(error: T) -> Self { - Error::from_text(error.to_string()) - } -} - pub fn prefix_if_error(prefix: &str, result: Result) -> Result { match result { Ok(value) => Ok(value),