Skip to content

feat: implement PartialEq on validation error types - #167

Merged
ya7010 merged 2 commits into
mainfrom
feature/partialeq-on-validation-errors
Oct 4, 2026
Merged

ya7010 merged 2 commits into
mainfrom
feature/partialeq-on-validation-errors

Conversation

@ya7010

@ya7010 ya7010 commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Implement PartialEq for Errors, Error, ArrayErrors, ObjectErrors, Message, and each *Error type
  • Format contains MessageFn (a function pointer), so PartialEq is implemented manually using address comparison (fn_addr_eq). Identical functions are not guaranteed to compare equal; this is documented in a doc comment
  • Makes the result of validate() usable where PartialEq is required, e.g. dioxus use_memo

Closes #166

Validation

  • cargo fmt -- --check
  • cargo clippy --workspace --all-features (no warnings)
  • cargo test --all-features (all passing)

🤖 Generated with Claude Code

ya7010 and others added 2 commits October 4, 2026 01:14
dioxus の use_memo など PartialEq を要求する用途で validate() の結果を
扱えるよう、Errors / Error / Message / Format および各 *Error 型に
PartialEq を derive する。

Closes #166

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ya7010 ya7010 changed the title feat: バリデーションエラー型に PartialEq を実装 feat: implement PartialEq on validation error types Oct 3, 2026
@ya7010
ya7010 merged commit 018ac61 into main Oct 4, 2026
6 checks passed
@ya7010
ya7010 deleted the feature/partialeq-on-validation-errors branch October 4, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PartialEq on validation::Errors

1 participant