aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs9
1 files changed, 9 insertions, 0 deletions
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<E: Error> From<io::Error> for ArchiveError<E> {
17 } 17 }
18} 18}
19 19
20impl<E: Error + PartialEq> PartialEq<E> for ArchiveError<E> {
21 fn eq(&self, other: &E) -> bool {
22 match self {
23 Self::Archivator { error, .. } => error == other,
24 _ => false,
25 }
26 }
27}
28
20impl<E: Error> Display for ArchiveError<E> { 29impl<E: Error> Display for ArchiveError<E> {
21 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 30 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22 match self { 31 match self {