-
-
Notifications
You must be signed in to change notification settings - Fork 114
feat: email validation option #903
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
feat: email validation option #903
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #903 +/- ##
==========================================
+ Coverage 94.32% 94.38% +0.05%
==========================================
Files 78 78
Lines 17301 17529 +228
==========================================
+ Hits 16319 16544 +225
- Misses 982 985 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #903 will improve performances by 13.3%Comparing Summary
Benchmarks breakdown
|
| use crate::EmailOptions; | ||
| use email_address::Options as EmailAddressOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one could be extracted to module level use to avoid repeating it in every test function
| pub struct EmailOptions { | ||
| pub(crate) inner: EmailAddressOptions, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to have an API to configure the actual options, otherwise it feels somewhat limited for cases when the user wants to customize it. I.e. the current option would be to have that EmailAddressOptions and configure it first, so the user will need to add that crate to dependencies too + create that instance first - I'd like to avoid that.
crates/jsonschema/src/options.rs
Outdated
| /// | ||
| /// This allows full access to all options provided by the `email_address` crate. | ||
| #[must_use] | ||
| pub fn from_options(options: EmailAddressOptions) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From would be nice
- Added EmailOptions builder methods - imported EmailOptions at module level - Implemented From trait Also added extensive docstrings
Stranger6667
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
resolves #894