From 9cb02f67900d281661d0a3d5f5cc3b19acda2510 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 29 Jul 2023 20:22:57 +0100 Subject: [PATCH] clean up Error --- src/errors.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 84c2ac6..70fed6e 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,8 +1,8 @@ -use std::{fmt::Display, str::Utf8Error, string::FromUtf8Error}; +use std::{str::Utf8Error, string::FromUtf8Error}; #[derive(Debug)] pub struct Error { - details: String, + pub details: String, } impl Error { pub fn message(details: &str) -> Self { @@ -11,11 +11,6 @@ impl Error { } } } -impl Display for Error { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.write_str(self.details.to_string().as_str()) - } -} impl From for Error { fn from(value: Utf8Error) -> Self { Self {