Closed jirutka closed 1 year ago
Can you make the PR on the next branch?
Can you make the PR on the next branch?
Ok, done.
Thanks for merging! When can I expect a new release?
Not anytime soon, the plan is to rewrite the derive macro for the next version
If it takes longer, why don’t you just release the new version now and rewrite the macros in the next one?
Avoid unnecessary case-insensitive regexes
The case-insensitive flag
(?i)
requires regex with the unicode-case feature enabled which significantly increases the binary size and makes regex slower.Disable unnecessary/unused regex features
regex crate with default features enabled is huge, it significantly increases the binary size and compile time.
Cargo features are additive, so once some feature is enabled anywhere in the dependency graph, there's no way to disable it, i.e. one (transitive) dependency infects the whole dependency graph.
Since
#[validate(regex = "...")]
takes a path to a static Regex instance, not regex as a string, users have to add theregex
dependency to their Cargo.toml to use it. Therefore, this change shouldn't break backward compatibility.