From 23cf2eaabef7d2038ade7094025a047f730a30bb Mon Sep 17 00:00:00 2001 From: Maaz Ahmed <maaz.a@subcom.tech> Date: Mon, 12 Feb 2024 15:28:29 +0530 Subject: [PATCH] fix: implement essential traits on error types --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index cde9123..187d793 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -155,7 +155,7 @@ impl SchemaInspector { /// fails to conform to the schema the inspector was compiled with. /// /// The error type internally holds a string containing detailed information about what part of the JSON differs from the schema -#[derive(Debug)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct SchemaError { cause: String, } @@ -169,7 +169,7 @@ impl Display for SchemaError { } /// All the possible errors that can occur while initializing [`SchemaInspector`] -#[derive(Debug)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum InitError { SchemaNotFound(String), ResolutionFailure(String), // contains the reference that was not resolved -- GitLab