Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Validation::Custom variant #168

Merged
merged 16 commits into from
Aug 24, 2024
Merged

Add Validation::Custom variant #168

merged 16 commits into from
Aug 24, 2024

Conversation

greyblake
Copy link
Owner

@greyblake greyblake commented Aug 11, 2024

Fixes #161

TODO:

  • Functionality
  • Tests
  • Documentation
    • README
    • lib.rs
    • CHANGELOG
  • Self code review

Comment on lines 879 to 885
{
let err: PositivelyOddParseError = "-3".parse::<PositivelyOdd>().unwrap_err();
assert!(matches!(
err,
PositivelyOddParseError::Validate(PositivelyOddError::Negative)
));
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case is redundant, cause we already have -1 case above.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in f31d01b

@greyblake greyblake merged commit bc00fa3 into master Aug 24, 2024
5 checks passed
@greyblake greyblake deleted the custom-error branch August 24, 2024 14:24
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom errors
1 participant