From 9c0e544e79a4f7874dab449674a11d899bf61963 Mon Sep 17 00:00:00 2001 From: Igor Tolmachev Date: Tue, 16 Jul 2024 20:08:01 +0900 Subject: Add tests and fix bugs --- src/error.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 97a4e62..518b0e9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -17,6 +17,15 @@ impl From for ArchiveError { } } +impl PartialEq for ArchiveError { + fn eq(&self, other: &E) -> bool { + match self { + Self::Archivator { error, .. } => error == other, + _ => false, + } + } +} + impl Display for ArchiveError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { -- cgit v1.2.3