From a8071b359d321cc5c2f1b099cc311f76cbad9354 Mon Sep 17 00:00:00 2001 From: Wataru Otsubo Date: Thu, 30 Jan 2025 01:19:41 +0900 Subject: [PATCH] add: derive(PartialEq) to error types --- src/converter.rs | 2 +- src/parser.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/converter.rs b/src/converter.rs index a2e808d..7974a4f 100644 --- a/src/converter.rs +++ b/src/converter.rs @@ -8,7 +8,7 @@ use thiserror::Error; use crate::parser::{ParseEnumError, ParsePrefixedU32, ParsePrefixedU32Error}; use crate::types::Module; -#[derive(Debug, Error)] +#[derive(Debug, Error, PartialEq)] pub enum DomConversionError { #[error("attribute {attr} not found in element: {start} - {end}", start = pos.0, end = pos.1)] AttributeNotFound { diff --git a/src/parser.rs b/src/parser.rs index 91e7ae8..ec0ab99 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -26,7 +26,7 @@ mod parse_prefixed_u32 { use thiserror::Error; - #[derive(Debug, Error)] + #[derive(Debug, Error, PartialEq)] pub enum ParsePrefixedU32Error { #[error("invalid prefix: found {found}")] InvalidPrefix { found: char },